SDL_PushGPUComputeUniformData

Function SDL_PushGPUComputeUniformData 

Source
pub unsafe extern "C" fn SDL_PushGPUComputeUniformData(
    command_buffer: *mut SDL_GPUCommandBuffer,
    slot_index: Uint32,
    data: *const c_void,
    length: Uint32,
)
Expand description

Pushes data to a uniform slot on the command buffer.

Subsequent draw calls in this command buffer will use this uniform data.

The data being pushed must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

§Parameters

  • command_buffer: a command buffer.
  • slot_index: the uniform slot to push data to.
  • data: client data to write.
  • length: the length of the data to write.

§Availability

This function is available since SDL 3.2.0.