Commit Graph

3148 Commits

Author SHA1 Message Date
Ray
5d09ca550f Update issue templates 2019-05-06 22:27:16 +02:00
Ray
7be6e3e288 Update issue templates 2019-05-06 17:31:49 +02:00
Ray
7a23a35eed Remove broken example: standard_lighting 2019-05-06 16:39:25 +02:00
Ray
621965cb8c Move bunnymark example to another module 2019-05-06 16:38:58 +02:00
Ray
8bafe03ee0 Update text_unicode.c 2019-05-06 10:54:45 +02:00
Ray
eeef7fdb51 Review example formatting 2019-05-06 10:46:56 +02:00
Ray
528e164ac5 Corrected issue with wrong text measuring 2019-05-06 10:17:34 +02:00
Ray
80c8599e81 Avoid warnings pre-evaluating values
Variable operations inside the functions should be evaluated before the function operations.
2019-05-06 10:07:06 +02:00
Ray
4c33d38812 Avoid warnings pre-evaluating values
Variable operations inside the functions should be evaluated before the function operations.
2019-05-06 10:05:43 +02:00
Ray
2ddc4bacba Example review 2019-05-06 09:41:54 +02:00
Ahmad Fatoum
3e0e91013f
Revert "CMake: make unsequenced modifications an error"
This reverts commit 23c1c0bdb2.

Because add_if_flag_compiles apparently allows unsequenced
even if the compiler doesn't support it..
2019-05-04 23:56:38 +02:00
Ahmad Fatoum
23c1c0bdb2
CMake: make unsequenced modifications an error
They not only result in discrepancies between different compiler,
but trigger undefined behavior. Avoid them by having them break
the CMake build and CI.
2019-05-04 23:20:29 +02:00
Ahmad Fatoum
43bfb979e5
examples: CMake: warn once only about macOS OpenGL deprecation
Otherwise compiling rlgl is too spammy. While at it remove
the now unneeded CheckIncludeFiles.
2019-05-04 23:05:30 +02:00
Ahmad Fatoum
ae2e48c77f
CMake: don't use system GLFW headers if using built-in GLFW
This fixes the current CI failure.
2019-05-04 23:04:52 +02:00
Ahmad Fatoum
7d57a64337
Travis CI: build, don't download, external GLFW
CI is failing because we still test with GLFW 3.2, while
the internal GLFW is 3.3. To avoid such breakages in future,
build and install our own GLFW instead of relying on an external
Debian package.
2019-05-04 23:04:52 +02:00
Ahmad Fatoum
36d8a648f0
external: glfw: reinstate export of GLFW_PKG_{DEPS,LIBS}
We were doing this before, but it was deleted during the
last GLFW update. Readd it to fix the associated macOS CI failure.

Fixes: cd934c9f6 ("Update GLFW to 3.3.1")
2019-05-04 22:28:21 +02:00
Ahmad Fatoum
2cda760312
examples: CMake: don't build core_loading_thread if no pthreads
The example requires pthreads and now C11 <stdatomic.h>, thus skip it
if either isn't available.

This also fixes the current Travis CI build failure for the
Windows configuration.
2019-05-04 21:23:41 +02:00
Ahmad Fatoum
6681fd7df2
examples: core_loading_thread: fix race condition
A plain variable is insuffecient for inter-thread communication. Both the
compiler and the processor may reorder accesses. The compiler could even
cache dataLoaded with the result that STATE_FINISHED becomes unreachable.

Fix this by using C11 atomic_bool, which guarantees sequential consistency.

This fixes #827.
2019-05-04 21:23:19 +02:00
Ahmad Fatoum
53d9beb534
examples: core_loading_thread: use symbolic names for state machine states
And while at it, use a switch clause to make the state machine
structure clearer.
2019-05-04 17:15:48 +02:00
Ray
0fe409bfa9 Renamed example 2019-05-03 17:57:36 +02:00
Ray
f53395694d Create examples_template.c 2019-05-03 17:56:58 +02:00
Ray
62f1511e5f Batch of 9 new shapes examples!
Some examples included in this batch require the included libraries: `easings.h` and `raygui.h`. Examples included:

 - shapes_bouncing_ball
 - shapes_collision_area
 - shapes_following_eyes
 - shapes_draw_circle_sector (requires raygui.h)
 - shapes_draw_rectangle_rounded (requires raygui.h)
 - shapes_draw_ring (requires raygui.h)
 - shapes_easings_ball_anim (requires easings.h)
 - shapes_easings_box_anim (requires easings.h)
 - shapes_easings_rectangle_array (requires easings.h)
2019-05-03 16:00:16 +02:00
Ray
0c53360a3a new example: textures_sprite_explosion 2019-05-03 15:56:07 +02:00
Ray
c6b7f9c5b0 Some minor comments 2019-05-03 15:55:24 +02:00
Ray
f44888e466 Force HighDPI on macOS 2019-05-03 09:45:16 +02:00
Ray
4d00b5a8bb
Merge pull request #824 from kawa-yoiko/highdpi-cmakeopt
Add SUPPORT_HIGH_DPI to CMakeOptions.txt
2019-05-03 09:42:48 +02:00
Shiqing
780cefc3b0 Add SUPPORT_HIGH_DPI to CMakeOptions.txt 2019-05-03 12:24:20 +08:00
Ray
0b2bad4205 Update models_first_person_maze.c 2019-05-02 13:24:02 +02:00
Ray
beda4180cd Added missing include 2019-05-02 13:15:05 +02:00
Ray
a9ebf8e10d new example: textures_sprite_button 2019-05-02 13:01:36 +02:00
Ray
34feacc148 new example: core_loading_thread
Data loading in a second thread with progress bar in main thread
2019-05-02 12:22:54 +02:00
Ray
d46160fb6e example review: models_first_person_maze
Added walls collision check
2019-05-02 12:22:15 +02:00
Ray
fc56f8d9ef Work on touch_as_mouse input -WIP- 2019-05-02 09:46:01 +02:00
Ray
73a54fcc3d Update Makefile 2019-05-02 00:15:46 +02:00
Ray
0f84f9f51f
Merge pull request #823 from Narice/master
Defined PI (#822)
2019-05-02 00:07:31 +02:00
Narice
a54af067c2
Added guards to PI define
Added guards to not redefine it if the user is using it with raylib.h
also added an 'f' at the end of the define to keep compliant with raylib's PI define
2019-05-01 22:03:32 +02:00
Narice
59c436c922
Defined PI (#822)
PI is not always defined in math.h, thus it must be defined in this header
2019-05-01 21:41:51 +02:00
Ray
c9025ed205 Corrected issue with texture rendering
Not sure if already corrected...
2019-05-01 16:15:33 +02:00
Ray
bb2841a26d WARNING: Support high DPI displays
This change could break things. So, I created SUPPORT_HIGH_DPI flag to enable it (disabled by default).

Basically, it detects HighDPI display and scales all drawing (and mouse input) appropiately to match the equivalent "standardDPI" screen size on highDPI. It uses screenScaling matrix to do that.

This scaling comes with some undesired effects, like aliasing on default font text (keep in mind that font is pixel-perfect, not intended for any non-rounded scale factor).

The only solution for this aliasing would be some AA postpro filter or implementing the highDPI scaling in a different way: rendering to a texture and scaling it with FILTER_BILINEAR, check `core_window_scale_letterbox.c` example for reference.

Use at your own risk.
2019-05-01 14:30:36 +02:00
raysan5
270f563964 Minor tweaks 2019-04-28 18:30:27 +02:00
raysan5
100c82e369 Review formatting to follow raylib style 2019-04-28 18:23:21 +02:00
Ray
fc6186a632
Merge pull request #821 from NerdThings/gamepad-rework
Gamepad Rework
2019-04-28 18:12:36 +02:00
Reece Mackie
a51f3be38f Fix web 2019-04-28 16:53:20 +01:00
Reece Mackie
f36ba6a2f4 Damn, made a mistake 2019-04-28 16:32:05 +01:00
Reece Mackie
948a442704 Update gamepad example to use new enums 2019-04-28 16:20:14 +01:00
Reece Mackie
86eba24970 This is dumb... 2019-04-28 16:08:07 +01:00
Reece Mackie
e69688437a Why does visual studio keep using tabs!!! 2019-04-28 16:06:56 +01:00
Reece Mackie
d42965b0b0 Fix tabs 2019-04-28 16:05:45 +01:00
Reece Mackie
3244ec2a1d Add another UWP comment for clarity 2019-04-28 16:03:23 +01:00
Reece Mackie
7ca856f9b7 Formatting changes 2019-04-28 15:59:39 +01:00