Ryan C. Gordon
615c935d11
events: Added SDL_RenderEvent.
...
Fixes #11465 .
2024-11-22 15:01:09 -05:00
Marcin Serwin
587384756f
render: use nearest pixel scaling for debug text
...
The debug text font is less legible when scaled linearly.
2024-11-20 18:06:53 -08:00
Sam Lantinga
b43b333d25
Moved the GPU renderer to the bottom of the list
...
We've gotten the feedback we wanted from having it first, so we'll move the other renderers back up for the widest compatibility across devices and platforms.
Fixes https://github.com/libsdl-org/SDL/issues/11468
2024-11-15 08:32:49 -08:00
Evan Hemsley
119b4fa5f5
GPU: Remove D3D11 backend and allow D3D12 to ingest DXBC ( #11456 )
2024-11-12 10:55:21 -08:00
Sam Lantinga
6823e3f005
Fixed gaps in scaled 9-grid texture rendering
2024-11-03 20:47:45 -08:00
Sam Lantinga
87dade4421
Set SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER for the GPU renderer
...
Fixes https://github.com/libsdl-org/SDL/issues/11393
2024-11-01 18:38:42 -07:00
Dan Ginsburg
4f160d69a6
Closes #10318 - implement Android prerotation in the Vulkan renderer
2024-10-25 14:21:29 -07:00
Ivan Epifanov
1f8b9a320c
VITA: fix SDL_ShowMessageBox by using different memory type
2024-10-22 12:19:33 -07:00
Sam Lantinga
3d47877bb4
Added SDL_EVENT_RENDER_DEVICE_LOST
...
This is sent when the device is lost and can't be recovered.
Also fixed the vulkan renderer so it returns errors appropriately and will log and break if debug mode is enabled.
2024-10-21 13:28:40 -07:00
Ryan C. Gordon
ef758d05c1
render: GetRenderViewportSize shouldn't use scale, just logical presentation.
...
Fixes #11076 .
2024-10-21 11:17:16 -04:00
Sam Lantinga
92520c1d9b
Improved D3D12 handling of unrecoverable device loss
2024-10-21 00:38:42 -07:00
Sam Lantinga
315842cf71
Fixed crashes handling D3D11/12 device lost in testsprite
...
You can test this using "dxcap -forcetdr"
2024-10-21 00:29:18 -07:00
Sam Lantinga
e2254b1045
Added color scale info for the GPU renderer TODO item
2024-10-20 18:38:02 -07:00
Sam Lantinga
dcbb2f11a8
Clamp the texture alpha and color modulation values to 0-255
2024-10-19 20:18:57 -07:00
华仔
5c1ccaefae
Fixed VULKAN_UpdateViewport judgment.
2024-10-19 09:51:12 -07:00
Sam Lantinga
b40ad5428b
Fixed assertion at quit when the debug text was the last texture used.
2024-10-18 14:51:40 -07:00
Sam Lantinga
c5e1ae4580
Only free debug_char_texture_atlas if it has been allocated
...
Fixes https://github.com/libsdl-org/SDL/issues/11254
2024-10-17 17:19:49 -07:00
Sam Lantinga
00f4cb308b
Fixed crash if the Vulkan renderer changes swapchain image count
2024-10-17 17:19:49 -07:00
Ivan Epifanov
f79f21217b
VITA: fix yuv texture update
2024-10-17 07:53:26 -07:00
Sylvain
09e3af58b5
Fixed bug #10954 : software renderer: examples/renderer/10-geometry missing a triangle
...
typo when changing return code from int to bool
2024-10-16 16:48:05 +02:00
Ivan Epifanov
860e38a3a2
VITA: fix shader color format
2024-10-16 07:43:14 -07:00
Sam Lantinga
97f1da73da
Rename GPU properties for consistency
2024-10-15 15:36:26 -07:00
Ryan C. Gordon
c20918b0fb
render: Add SDL_RenderDebugText().
...
Fixes #11201 .
2024-10-14 02:45:33 -04:00
Sam Lantinga
1cc85c912b
Check return value of SDL_small_alloc()
...
Fixes https://github.com/libsdl-org/SDL/issues/8959
2024-10-13 14:07:26 -07:00
Sam Lantinga
c8f5f6d47a
Added SDL_DelayPrecise()
...
SDL_DelayNS() now passes through to the high precision OS delay function, and SDL_DelayPrecise() tries to busy wait to get as close as possible to the desired wait time.
Fixes https://github.com/libsdl-org/SDL/issues/11141
2024-10-10 08:06:18 -07:00
Petar Popovic
020fb6889c
Removed unnecessary const-qualifiers in src and test files
2024-10-03 17:39:08 -04:00
Ryan C. Gordon
191f3ecbbc
render: Restore previous policy for converting window/render coordinates.
...
Before this commit, it would adjust for the logical presentation settings.
Now, it works as it did before the logical presentation render target was
removed: it takes current viewport and scale into account, as well.
Fixes #10978 .
2024-10-03 16:31:56 -04:00
Petar Popovic
3246df8bd3
Remove redundant SDL_Vulkan_GetResultString() declaration
2024-10-03 13:29:53 -07:00
Ryan C. Gordon
0b5e01a305
loadso: library handles are now `SDL_SharedObject*` instead of `void*`.
...
Improved the SDL_loadso.h documentation a little, too.
Fixes #11009 .
2024-10-01 12:16:10 -04:00
Sam Lantinga
3234a3b902
Simplified internal SDL_Surface structure
2024-10-01 08:10:04 -07:00
Sam Lantinga
1f3a0d12e6
Made texture size and format public in the API
...
Also added refcount to textures so they can be retained by application code.
2024-10-01 08:10:04 -07:00
Ryan C. Gordon
5136b30652
render: SDL_ConvertEventToRenderCoordinates() now handles pen events.
...
Reference Issue #10863 .
2024-10-01 10:30:36 -04:00
cosmonaut
3eab599977
just force the barrier on UpdateTexture actually
2024-09-30 19:47:27 -07:00
cosmonaut
e17741a6cb
Render GPU: Only cycle on update if entire texture is replaced
2024-09-30 19:47:27 -07:00
Sam Lantinga
45ad763de5
Disable backface culling and use a constant rectangle winding order.
...
This makes it so we don't have to surface the rectangle winding order for applications that want to use the raw geometry API.
2024-09-30 19:12:02 -07:00
Evan Hemsley
afdf325fb4
GPU: Add swapchain dimension out params ( #11003 )
2024-09-30 10:23:19 -07:00
Ozkan Sezer
5f304b3a47
Fix builed error after commit 0e45b824e3 due to -Wunused-variable
2024-09-29 15:40:02 +03:00
Sam Lantinga
0e45b824e3
renderer: always update the output pixel size at startup
...
Fixes https://github.com/libsdl-org/SDL/issues/10990
2024-09-29 05:22:28 -07:00
Evan Hemsley
66f6b40c92
Render GPU: Don't call GetWindowSizeInPixels during RenderPreset ( #10984 )
2024-09-28 18:01:16 -07:00
Evan Hemsley
be401dd1e3
GPU: More robust error reporting ( #10958 )
...
---------
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
2024-09-27 00:30:18 -07:00
Petar Popovic
457d0edeaf
Remove some extra semicolons
2024-09-26 20:01:56 +03:00
Ryan C. Gordon
3abb213083
opengl: Fixed SDL_RENDERCMD_SETDRAWCOLOR code checking the wrong variable.
2024-09-25 23:14:32 -04:00
Ryan C. Gordon
961cd51611
opengl: Removed a FIXME (this is documented as not-thread-safe now.
2024-09-25 23:14:32 -04:00
Ryan C. Gordon
4c48ff51f8
render: SDL_RenderPresent now behaves when a render target is currently set.
...
It'll temporarily unbind it, draw letterboxing if necessary, present, and
then rebind the previous render target.
2024-09-25 16:26:36 -04:00
Ryan C. Gordon
7a6a0becb8
render: Fixed a FIXME for SDL_SetRenderViewport with a negative size.
2024-09-25 16:26:36 -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
bf7a48cdcc
render/gpu: Change some memcpy calls to SDL_memcpy.
2024-09-25 16:26:36 -04:00
Simon McVittie
23f855a970
render: Integrate fix-shaders.sh into build-shaders.sh
...
By writing the fxc and dxc output to a temporary file and then
converting that temporary file to the desired filename, we avoid
the incompatible semantics of sed -i on GNU systems (sed -i does not
create a backup filename, and does not take an argument unless it is
"bundled") and macOS (sed -i requires an argument, possibly empty).
Resolves: https://github.com/libsdl-org/SDL/issues/10878
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-18 10:38:59 -07:00
Sam Lantinga
a90ad3b0e2
Removed SDL_bool in favor of plain bool
...
We require stdbool.h in the build environment, so we might as well use the plain bool type.
If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
2024-09-18 08:32:30 -07:00
Sam Lantinga
c68e9e157c
Fixed typo
2024-09-17 10:59:28 -07:00