Added support for using the GPU renderer as an offscreen renderer

SDL_CreateGPURenderer() now allows passing in an existing GPU device and passing in a NULL window to create an offscreen renderer.

Also renamed SDL_SetRenderGPUState() to SDL_SetGPURenderState().
This commit is contained in:
Sam Lantinga committed 2025-10-01 23:32:18 -07:00
1 parent 9461db1ec8
commit a864dcac25
36 files changed
+2390 -3981

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
#include "cube.hlsli"
cbuffer UBO : register(b0, space1)
{
float4x4 ModelViewProj;
};
VSOutput main(VSInput input)
{
VSOutput output;
output.Color = float4(input.Color, 1.0f);
output.Position = mul(ModelViewProj, float4(input.Position, 1.0f));
return output;
}