Commit graph

8,250 commits

Author SHA1 Message Date
Jonathan Marler
00fb09cebf Prevent immediate window restore from minimize in core_window_flags
The core_window_flags example automatically restores the window from
being minimized after 3 seconds. However, it only resets the frameCounter
if the window is minimized through the app from inputting KEY_N.  This
means if you miminize the window by other means (like pressing the minimize
button) then the example will immediately restore the window because the
frame counter wasn't reset. I've fixed this by setting the frameCounter
back to 0 once it's expired. I also added a note in the UI that the example
automatically restores the window so it's not a surprise.
2025-03-26 20:02:03 -06:00
Jonathan Marler
8749ba9ebf Uncomment SetTargetFPS in core_window_flags
I think this line was accidently commented out in this commit:

3d1ae3500c

The FPS limit is needed to get the desired wait time for the "hide window"
test, which uses the frame counter to hide the window for 3 seconds. On
my machine without this limit it runs at over 1000 FPS and it appears
like the hide window state is broken.

I also added some text that tells the user that it only hides the window
for 3 seconds so they're not surprised when the window automatically
reappears.
2025-03-26 16:35:31 -06:00
luis605
8ec52e3b25 Added example to build system 2025-03-26 19:47:45 +00:00
luis605
eeda7a4b82 Added shaders_view_depth example to the build system 2025-03-26 17:41:04 +00:00
Ray
001e78014c
Merge pull request #4860 from marler8997/fixDivide0
Avoid divide by 0 in core_custom_frame_control example
2025-03-26 18:01:37 +01:00
luis605
e08fc8ab80 Added new example - [shader] render depth texture 2025-03-26 16:59:05 +00:00
Jonathan Marler
611c43719f Avoid divide by 0 in core_custom_frame_control example 2025-03-26 10:58:59 -06:00
MikiZX1
55c6864092
Update rcore_desktop_sdl.c
raylib app crashing when started and a gamepad is already connected to the PC (even if the gamepad is not used in the app). I only tested this with a gamepad that has a layout which is not recognized. Using SDL3 as backend.
2025-03-26 14:06:58 +01:00
Ray
beaadc9185
Merge pull request #4856 from marler8997/oneBuild
[build] remove examples/build.zig, incorporate into main build.zig
2025-03-25 22:39:13 +01:00
Ray
3d83c1c796 Format tweak 2025-03-25 19:27:55 +01:00
Jonathan Marler
ac17de5074 [build] remove examples/build.zig, incorporate into main build.zig
Removes the second build.zig in the examples directory and incorporates it
into the main build.zig. This gives the zig build system the data needed to
know if the raylib library needs to be rebuilt when running any example.
2025-03-25 11:05:59 -06:00
Ray
909c83fd4a Avoid path filtering on TakeScreenshot() 2025-03-25 16:22:46 +01:00
Ray
32c8f396c2 Merge branch 'master' of https://github.com/raysan5/raylib 2025-03-25 16:21:53 +01:00
Ray
63e608d485 comment tweak 2025-03-24 15:07:36 +01:00
Le Juez Victor
973beee3a6
Merge branch 'raysan5:master' into rlsw 2025-03-24 14:39:39 +01:00
Bigfoot71
a420e5ab82 def sw alloc macros 2025-03-24 14:38:19 +01:00
Bigfoot71
f3de37eff3 add get error function 2025-03-24 14:35:51 +01:00
Bigfoot71
f902cc3f29 fix typo.. 2025-03-24 14:34:21 +01:00
Bigfoot71
be24b06356 texture copy support 2025-03-24 14:33:12 +01:00
Ray
f5c96302d5
Merge pull request #4850 from sleeptightAnsiC/fix_rcore__ChangeDirectory_TRACELOG
[rcore] fix: TRACELOG upon successfully changing directory
2025-03-23 19:13:12 +01:00
Bigfoot71
89d40510c6 update rlgl.h 2025-03-22 22:49:24 +01:00
Bigfoot71
c9338481a4 update rlgl.h 2025-03-22 22:44:59 +01:00
sleeptightAnsiC
8e9c3ceb57 [rcore] fix: TRACELOG upon successfully changing directory
InitWindow() prints CWD during initialization,
but ChangeDirectory() does not, which is quite confusing when you start
messing with CWD. Now said function should log similar message.
2025-03-22 21:20:17 +01:00
Bigfoot71
c7fa9a0fa2 review swCopyFramebuffer 2025-03-22 20:00:32 +01:00
Bigfoot71
02f7d3146b impl copy framebuffer function + glReadPixels 2025-03-22 19:50:27 +01:00
Bigfoot71
64c39e9d53 binding tweaks 2025-03-22 19:19:15 +01:00
Bigfoot71
13585d8684 add glHint and glShadeModel macros (not implmented) 2025-03-22 18:30:27 +01:00
Le Juez Victor
f447c97662
Merge branch 'raysan5:master' into rlsw 2025-03-22 18:09:38 +01:00
Bigfoot71
618f283cb2 gl binding 2025-03-22 17:59:58 +01:00
Bigfoot71
2009490151 add getter functions 2025-03-22 17:16:21 +01:00
Bigfoot71
26dfe69e5f remove unused defs 2025-03-22 15:57:55 +01:00
Bigfoot71
2f9eb5b727 impl point scissor clipping 2025-03-22 15:57:12 +01:00
Bigfoot71
633e34e457 round screen coordinate (line rasterization) 2025-03-22 15:19:55 +01:00
Bigfoot71
f0b02b8cad impl line scissor clipping 2025-03-22 15:18:41 +01:00
Bigfoot71
3441cf6327 review swScissor 2025-03-22 12:47:31 +01:00
Bigfoot71
0fb0c5cd38 review scissor clear 2025-03-22 12:44:32 +01:00
Ray
46cd07d2c7 WARNING: REVERTED CHANGE THAT BROKE BATCHING!!! #4849
I'm sorry... I did not detect this change was breaking batching... :(
2025-03-21 17:17:45 +01:00
Ray
266fba1111 Minor tweaks 2025-03-21 17:07:55 +01:00
Ray
add4da8fb3
Merge pull request #4845 from bamless/log-zoom
[examples] use logarithmic zoom scaling in 2d camera examples
2025-03-20 10:38:59 +01:00
Fabrizio Pietrucci
e140aca1b5 Increase zoom factor in core_2d_camera.c
This compensate for slower zoom speed due to log scaling
2025-03-19 20:19:19 +01:00
Fabrizio Pietrucci
8b84c999d2 Use logarithmic zoom scaling in 2d camera zoom examples 2025-03-19 19:48:04 +01:00
Bigfoot71
d3b6fa4785 start to impl scissor test + review line clipping
The support for the scissor test has been implemented for clearing as well as for triangle clipping.
The implementation for lines and points is still missing.

I also removed the 2D clipping of lines that used the Cohen-Sutherland algorithm, opting instead to always use the Liang-Barsky algorithm in all cases.
This simplifies the implementation, and the 2D version would have caused issues when interpolating vertices in the future if we want to implement additional features.
2025-03-19 04:21:27 +01:00
Bigfoot71
268a410a13 add quick notes about line clipping algorithms used 2025-03-19 02:19:28 +01:00
Bigfoot71
fe600a5ea1 framebuffer resizing + handle init failure 2025-03-19 02:04:59 +01:00
Bigfoot71
06e49a048a add some not planned functions
- `glDepthMask`
- `glColorMask`
2025-03-19 01:41:24 +01:00
Bigfoot71
fc52b7710c impl polygone modes 2025-03-19 01:28:41 +01:00
Ray
cd9206956c
Merge pull request #4843 from theundergroundsorcerer/DrawCircleSector-quickfix
Add early return when angles are equal in DrawCircleSector and DrawCircleSectorLine functions.
2025-03-18 11:29:32 +01:00
Myrddin Krustowski
589ad0a33d Add early return to circle sector functions when angles are equal.
Prevents unnecessary work and division by zero (when segments=0) in DrawCircleSector/DrawCircleSectorLines when startAngle equals endAngle, matching existing behavior in DrawRing/DrawRingLines.
2025-03-18 11:51:58 +02:00
Bigfoot71
793d56c701 fix and improve polygon clipping functions 2025-03-16 03:42:33 +01:00
Bigfoot71
e15c0d9639 impl points + point size 2025-03-16 02:17:35 +01:00