GPU: Document structs (#10742)

This commit is contained in:
Evan Hemsley
2024-09-07 08:29:14 -07:00
committed by GitHub
parent cf9613fe63
commit 68a9991ec9
6 changed files with 516 additions and 287 deletions

View File

@@ -571,17 +571,17 @@ init_render_state(int msaa)
pipelinedesc.vertex_shader = vertex_shader;
pipelinedesc.fragment_shader = fragment_shader;
vertex_binding.binding = 0;
vertex_binding.index = 0;
vertex_binding.input_rate = SDL_GPU_VERTEXINPUTRATE_VERTEX;
vertex_binding.instance_step_rate = 0;
vertex_binding.pitch = sizeof(VertexData);
vertex_attributes[0].binding = 0;
vertex_attributes[0].binding_index = 0;
vertex_attributes[0].format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3;
vertex_attributes[0].location = 0;
vertex_attributes[0].offset = 0;
vertex_attributes[1].binding = 0;
vertex_attributes[1].binding_index = 0;
vertex_attributes[1].format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3;
vertex_attributes[1].location = 1;
vertex_attributes[1].offset = sizeof(float) * 3;