sdlDrawGpuPrimitivesIndirect function

void sdlDrawGpuPrimitivesIndirect(
  1. Pointer<SdlGpuRenderPass> renderPass,
  2. Pointer<SdlGpuBuffer> buffer,
  3. int offset,
  4. int drawCount,
)

Draws data using bound graphics state and with draw parameters set from a buffer.

The buffer must consist of tightly-packed draw parameter sets that each match the layout of SDL_GPUIndirectDrawCommand. You must not call this function before binding a graphics pipeline.

\param render_pass a render pass handle. \param buffer a buffer containing draw parameters. \param offset the offset to start reading from the draw buffer. \param draw_count the number of draw parameter sets that should be read from the draw buffer.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUPrimitivesIndirect( SDL_GPURenderPass *render_pass, SDL_GPUBuffer *buffer, Uint32 offset, Uint32 draw_count)

Implementation

void sdlDrawGpuPrimitivesIndirect(Pointer<SdlGpuRenderPass> renderPass,
    Pointer<SdlGpuBuffer> buffer, int offset, int drawCount) {
  final sdlDrawGpuPrimitivesIndirectLookupFunction = libSdl3.lookupFunction<
      Void Function(Pointer<SdlGpuRenderPass> renderPass,
          Pointer<SdlGpuBuffer> buffer, Uint32 offset, Uint32 drawCount),
      void Function(
          Pointer<SdlGpuRenderPass> renderPass,
          Pointer<SdlGpuBuffer> buffer,
          int offset,
          int drawCount)>('SDL_DrawGPUPrimitivesIndirect');
  return sdlDrawGpuPrimitivesIndirectLookupFunction(
      renderPass, buffer, offset, drawCount);
}