ocelote_ml
008aa18810
updated png texture example
...
the example was updated to use png's but they didn't update the error message nor the comments
2026-01-16 12:21:30 -05:00
Ryan C. Gordon
69c78a7989
examples/renderer/03-lines: simplified casting on radians calculation.
2025-12-05 12:59:01 -05:00
Ryan C. Gordon
8be18741e1
examples/renderer/03-lines: Fix incorrect angle calculation rendering circle.
...
This fix was contributed by GitHub user hushangazar (thanks!).
Closes #14599 .
2025-12-05 10:36:41 -05:00
Cameron Cawley
0bbbf3d43b
Support resizable windows with most examples
2025-10-07 15:33:10 -04:00
Sam Lantinga
bb0d6221c1
Use PNG files for tests and examples
...
These are much smaller than the previous BMP files
Fixes https://github.com/libsdl-org/SDL/issues/14159
2025-10-06 16:45:53 -07:00
Sam Lantinga
9d6fb509fe
cliprect example: allow the clipping rectangle to extend outside the destination
2025-09-07 19:48:05 -07:00
Ryan C. Gordon
567dfd2ebc
examples/renderer/19-affine-textures: add metadata for examples.libsdl.org.
2025-03-28 14:19:30 -04:00
Ryan C. Gordon
5ab1aef367
examples/renderer/19-affine-textures: blue background so you can see the cube.
2025-03-28 14:19:30 -04:00
Ozkan Sezer
87e6d2250f
examples, affine-textures: fix RISC-OS build.
2025-03-28 20:56:50 +03:00
Ryan C. Gordon
254f348083
examples/renderer/19-affine-textures: Flip coords so SDL logo is right-side up.
2025-03-28 13:52:58 -04:00
Ryan C. Gordon
3915451058
examples/renderer/19-affine-textures: Whole source file was indented one space.
2025-03-28 13:15:04 -04:00
Ryan C. Gordon
2207f6bc9a
examples/renderer/affine-textures: Fixed compiler warnings.
2025-03-28 13:11:35 -04:00
expikr
83eea00d66
Create affine-textures.c
2025-03-28 10:06:29 -07:00
Petar Popovic
c70f54e28b
Remove redundant casts
2025-02-21 10:09:10 -08:00
Christian Walter
e29ebb9f18
Update geometry renderer example
...
This PR updates the geometry renderer example such that the `color` values of `vertices[3]` are set correctly in `SDL_AppIterate`.
2025-02-09 10:53:14 -08:00
Ryan C. Gordon
4d4a2786bb
render: Updates to format-string versions of SDL_RenderDebugText.
...
- Removes SDL_RenderDebugTextV
- Changes SDL_RenderDebugTextF to SDL_RenderDebugTextFormat and tweaks it to
work in a world without SDL_RenderDebugTextV.
- Tweaked rendering position of formatted text in the example program.
2024-12-18 10:40:31 -05:00
williamist
6abebca943
Fix format string in debug-text example
...
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com >
2024-12-18 10:40:31 -05:00
williamistGitHub
1d0e28a5b3
Add SDL_RenderDebugTextF & SDL_RenderDebugTextV
...
This should make it easier to quickly put important numbers and such on
the screen without having to format them into a string manually.
2024-12-18 10:40:31 -05:00
Ryan C. Gordon
90efb63e52
examples: Improve webpage generation in various ways, add thumbnails, etc.
2024-12-05 23:58:23 -05:00
Michael Palomas
21c91d5535
examples now using SDL_ALPHA_OPAQUE(_FLOAT) for opaque alpha value
2024-10-23 07:28:33 -07:00
Ryan C. Gordon
c20918b0fb
render: Add SDL_RenderDebugText().
...
Fixes #11201 .
2024-10-14 02:45:33 -04:00
Ryan C. Gordon
659f2f4b04
examples: add basic app metadata to all existing examples.
2024-10-07 17:41:15 -04:00
Ryan C. Gordon
fca05fa754
examples: Use SDL_Log() instead of message boxes for errors.
...
Fixes #11094 .
2024-10-06 22:38:04 -04:00
Ryan C. Gordon
1787d6ca5c
main: SDL_AppQuit() now reports the result value.
...
Fixes #10994 .
2024-09-29 23:24:04 -04:00
Ryan C. Gordon
86ea283904
examples: No need to explicitly seed the RNG at startup.
...
SDL does this for you; explicit seeding is only for reproducing a specific
sequence of numbers (or maybe reseeding at a later point).
2024-09-26 15:01:04 -04:00
Ryan C. Gordon
54459def69
render: Remove the logical presentation render target.
...
Now we render directly to the window, scaling as appropriate. This fixes some
concerns the render target introduced, like the quality of the final scaled
output, how to step outside of the logical size temporarily to draw some
things sharply at the native resolution, and loss of sub-pixel precision.
Fixes #8736 .
2024-09-25 16:26:36 -04:00
Ryan C. Gordon
fcab6c99fb
examples: Fixed some window titles.
2024-09-24 15:36:49 -04:00
Ryan C. Gordon
9881c4e582
examples: Added renderer/17-read-pixels
2024-09-24 15:31:21 -04:00
Ryan C. Gordon
62389ada6f
examples/renderer/02-primitives: seed the RNG.
2024-09-24 13:55:29 -04:00
Ryan C. Gordon
95134f6d58
examples: Added renderer/15-cliprect
2024-09-24 13:55:28 -04:00
Ryan C. Gordon
1ed3dac021
examples: Added renderer/14-viewport
...
(This intentionally skips a few example numbers, as I intend to fill in some
other topics before this, later.)
2024-09-23 14:16:32 -04:00
Ryan C. Gordon
e00ea27d25
examples/renderer/01-clear: No longer needs vsync.
...
This now chooses the next color based on time, so it won't go wild if the
framerate is unbounded.
2024-09-23 14:16:32 -04:00
Ryan C. Gordon
e973b687cd
examples: Added renderer/11-color-mods
2024-09-23 01:21:40 -04:00
Ryan C. Gordon
1828bde49f
examples/renderer/01-clear: Use the color-cycle code from testvulkan.c
...
(and testgpu_simple_clear.c, of course!)
2024-09-22 16:10:57 -04:00
Ozkan Sezer
b736285053
examples/renderer/08-rotating-textures: Fix compiler warning on MSVC .
2024-09-22 12:02:50 +03:00
Ryan C. Gordon
37d62deca1
examples/renderer/10-geometry: Fixes and cleanups.
2024-09-22 01:15:19 -04:00
Ryan C. Gordon
0758b2a0c4
examples: Added renderer/10-geometry
2024-09-22 01:10:33 -04:00
Ryan C. Gordon
1a90e09262
examples: Added renderer/09-scaling-textures
2024-09-22 01:10:32 -04:00
Ryan C. Gordon
4fdeb6861b
examples: a few renderer fixes.
2024-09-22 01:10:32 -04:00
Ryan C. Gordon
66b92e95ac
examples: renamed renderer sources to match other example directories.
2024-09-22 01:10:32 -04:00
Ryan C. Gordon
ffcf372d27
examples: Added renderer/08-rotating-textures
2024-09-22 01:10:31 -04:00
Ryan C. Gordon
0c7334cce3
examples: Added renderer/07-streaming-textures
2024-09-22 01:10:31 -04:00
Ryan C. Gordon
2bd3d9cfb7
examples: Added renderer/06-textures
2024-09-22 01:10:30 -04:00
Ryan C. Gordon
9d0b3eded6
examples: added renderer/05-rectangles
2024-09-22 01:10:30 -04:00
Ryan C. Gordon
3413617cb6
examples: added renderer/04-points
2024-09-22 01:10:30 -04:00
Ryan C. Gordon
b4e2777820
examples/renderer/03-lines: Fix compiler warning on Visual Studio.
2024-09-19 13:31:24 -04:00
Ryan C. Gordon
2e3e5abd7d
examples/renderer/03-lines: use a gray background.
2024-09-19 12:58:37 -04:00
Ryan C. Gordon
745d5e4991
examples/renderer/03-lines: Make this less obnoxious to look at.
2024-09-19 12:52:04 -04:00
Ryan C. Gordon
1b266ec13d
examples: added renderer/03-lines
2024-09-19 12:16:12 -04:00
Sam Lantinga
575d9cda6f
The parameter to SDL_AppEvent() should be non-const
...
This allows functions like SDL_ConvertEventToRenderCoordinates() to work without having to copy the event.
Fixes https://github.com/libsdl-org/SDL/issues/10691
2024-09-03 08:18:36 -07:00