sdlBeginGpuRenderPass function

Pointer<SdlGpuRenderPass> sdlBeginGpuRenderPass(
  1. Pointer<SdlGpuCommandBuffer> commandBuffer,
  2. Pointer<SdlGpuColorTargetInfo> colorTargetInfos,
  3. int numColorTargets,
  4. Pointer<SdlGpuDepthStencilTargetInfo> depthStencilTargetInfo,
)

Begins a render pass on a command buffer.

A render pass consists of a set of texture subresources (or depth slices in the 3D texture case) which will be rendered to during the render pass, along with corresponding clear values and load/store operations. All operations related to graphics pipelines must take place inside of a render pass. A default viewport and scissor state are automatically set when this is called. You cannot begin another render pass, or begin a compute pass or copy pass until you have ended the render pass.

\param command_buffer a command buffer. \param color_target_infos an array of texture subresources with corresponding clear values and load/store ops. \param num_color_targets the number of color targets in the color_target_infos array. \param depth_stencil_target_info a texture subresource with corresponding clear value and load/store ops, may be NULL. \returns a render pass handle.

\since This function is available since SDL 3.1.3.

\sa SDL_EndGPURenderPass

extern SDL_DECLSPEC SDL_GPURenderPass *SDLCALL SDL_BeginGPURenderPass( SDL_GPUCommandBuffer *command_buffer, const SDL_GPUColorTargetInfo *color_target_infos, Uint32 num_color_targets, const SDL_GPUDepthStencilTargetInfo *depth_stencil_target_info)

Implementation

Pointer<SdlGpuRenderPass> sdlBeginGpuRenderPass(
    Pointer<SdlGpuCommandBuffer> commandBuffer,
    Pointer<SdlGpuColorTargetInfo> colorTargetInfos,
    int numColorTargets,
    Pointer<SdlGpuDepthStencilTargetInfo> depthStencilTargetInfo) {
  final sdlBeginGpuRenderPassLookupFunction = libSdl3.lookupFunction<
          Pointer<SdlGpuRenderPass> Function(
              Pointer<SdlGpuCommandBuffer> commandBuffer,
              Pointer<SdlGpuColorTargetInfo> colorTargetInfos,
              Uint32 numColorTargets,
              Pointer<SdlGpuDepthStencilTargetInfo> depthStencilTargetInfo),
          Pointer<SdlGpuRenderPass> Function(
              Pointer<SdlGpuCommandBuffer> commandBuffer,
              Pointer<SdlGpuColorTargetInfo> colorTargetInfos,
              int numColorTargets,
              Pointer<SdlGpuDepthStencilTargetInfo> depthStencilTargetInfo)>(
      'SDL_BeginGPURenderPass');
  return sdlBeginGpuRenderPassLookupFunction(
      commandBuffer, colorTargetInfos, numColorTargets, depthStencilTargetInfo);
}