sdl3/generated/lib_sdl_gpu library

Functions

sdlAcquireGpuCommandBuffer(Pointer<SdlGpuDevice> device) Pointer<SdlGpuCommandBuffer>
Acquire a command buffer.
sdlAcquireGpuSwapchainTexture(Pointer<SdlGpuCommandBuffer> commandBuffer, Pointer<SdlWindow> window, Pointer<Pointer<SdlGpuTexture>> swapchainTexture, Pointer<Uint32> swapchainTextureWidth, Pointer<Uint32> swapchainTextureHeight) bool
Acquire a texture to use in presentation.
sdlBeginGpuComputePass(Pointer<SdlGpuCommandBuffer> commandBuffer, Pointer<SdlGpuStorageTextureReadWriteBinding> storageTextureBindings, int numStorageTextureBindings, Pointer<SdlGpuStorageBufferReadWriteBinding> storageBufferBindings, int numStorageBufferBindings) Pointer<SdlGpuComputePass>
Begins a compute pass on a command buffer.
sdlBeginGpuCopyPass(Pointer<SdlGpuCommandBuffer> commandBuffer) Pointer<SdlGpuCopyPass>
Begins a copy pass on a command buffer.
sdlBeginGpuRenderPass(Pointer<SdlGpuCommandBuffer> commandBuffer, Pointer<SdlGpuColorTargetInfo> colorTargetInfos, int numColorTargets, Pointer<SdlGpuDepthStencilTargetInfo> depthStencilTargetInfo) Pointer<SdlGpuRenderPass>
Begins a render pass on a command buffer.
sdlBindGpuComputePipeline(Pointer<SdlGpuComputePass> computePass, Pointer<SdlGpuComputePipeline> computePipeline) → void
Binds a compute pipeline on a command buffer for use in compute dispatch.
sdlBindGpuComputeSamplers(Pointer<SdlGpuComputePass> computePass, int firstSlot, Pointer<SdlGpuTextureSamplerBinding> textureSamplerBindings, int numBindings) → void
Binds texture-sampler pairs for use on the compute shader.
sdlBindGpuComputeStorageBuffers(Pointer<SdlGpuComputePass> computePass, int firstSlot, Pointer<Pointer<SdlGpuBuffer>> storageBuffers, int numBindings) → void
Binds storage buffers as readonly for use on the compute pipeline.
sdlBindGpuComputeStorageTextures(Pointer<SdlGpuComputePass> computePass, int firstSlot, Pointer<Pointer<SdlGpuTexture>> storageTextures, int numBindings) → void
Binds storage textures as readonly for use on the compute pipeline.
sdlBindGpuFragmentSamplers(Pointer<SdlGpuRenderPass> renderPass, int firstSlot, Pointer<SdlGpuTextureSamplerBinding> textureSamplerBindings, int numBindings) → void
Binds texture-sampler pairs for use on the fragment shader.
sdlBindGpuFragmentStorageBuffers(Pointer<SdlGpuRenderPass> renderPass, int firstSlot, Pointer<Pointer<SdlGpuBuffer>> storageBuffers, int numBindings) → void
Binds storage buffers for use on the fragment shader.
sdlBindGpuFragmentStorageTextures(Pointer<SdlGpuRenderPass> renderPass, int firstSlot, Pointer<Pointer<SdlGpuTexture>> storageTextures, int numBindings) → void
Binds storage textures for use on the fragment shader.
sdlBindGpuGraphicsPipeline(Pointer<SdlGpuRenderPass> renderPass, Pointer<SdlGpuGraphicsPipeline> graphicsPipeline) → void
Binds a graphics pipeline on a render pass to be used in rendering.
sdlBindGpuIndexBuffer(Pointer<SdlGpuRenderPass> renderPass, Pointer<SdlGpuBufferBinding> binding, int indexElementSize) → void
Binds an index buffer on a command buffer for use with subsequent draw calls.
sdlBindGpuVertexBuffers(Pointer<SdlGpuRenderPass> renderPass, int firstSlot, Pointer<SdlGpuBufferBinding> bindings, int numBindings) → void
Binds vertex buffers on a command buffer for use with subsequent draw calls.
sdlBindGpuVertexSamplers(Pointer<SdlGpuRenderPass> renderPass, int firstSlot, Pointer<SdlGpuTextureSamplerBinding> textureSamplerBindings, int numBindings) → void
Binds texture-sampler pairs for use on the vertex shader.
sdlBindGpuVertexStorageBuffers(Pointer<SdlGpuRenderPass> renderPass, int firstSlot, Pointer<Pointer<SdlGpuBuffer>> storageBuffers, int numBindings) → void
Binds storage buffers for use on the vertex shader.
sdlBindGpuVertexStorageTextures(Pointer<SdlGpuRenderPass> renderPass, int firstSlot, Pointer<Pointer<SdlGpuTexture>> storageTextures, int numBindings) → void
Binds storage textures for use on the vertex shader.
sdlBlitGpuTexture(Pointer<SdlGpuCommandBuffer> commandBuffer, Pointer<SdlGpuBlitInfo> info) → void
Blits from a source texture region to a destination texture region.
sdlCalculateGpuTextureFormatSize(int format, int width, int height, int depthOrLayerCount) int
Calculate the size in bytes of a texture format with dimensions.
sdlCancelGpuCommandBuffer(Pointer<SdlGpuCommandBuffer> commandBuffer) bool
Cancels a command buffer.
sdlClaimWindowForGpuDevice(Pointer<SdlGpuDevice> device, Pointer<SdlWindow> window) bool
Claims a window, creating a swapchain structure for it.
sdlCopyGpuBufferToBuffer(Pointer<SdlGpuCopyPass> copyPass, Pointer<SdlGpuBufferLocation> source, Pointer<SdlGpuBufferLocation> destination, int size, bool cycle) → void
Performs a buffer-to-buffer copy.
sdlCopyGpuTextureToTexture(Pointer<SdlGpuCopyPass> copyPass, Pointer<SdlGpuTextureLocation> source, Pointer<SdlGpuTextureLocation> destination, int w, int h, int d, bool cycle) → void
Performs a texture-to-texture copy.
sdlCreateGpuBuffer(Pointer<SdlGpuDevice> device, Pointer<SdlGpuBufferCreateInfo> createinfo) Pointer<SdlGpuBuffer>
Creates a buffer object to be used in graphics or compute workflows.
sdlCreateGpuComputePipeline(Pointer<SdlGpuDevice> device, Pointer<SdlGpuComputePipelineCreateInfo> createinfo) Pointer<SdlGpuComputePipeline>
Creates a pipeline object to be used in a compute workflow.
sdlCreateGpuDevice(int formatFlags, bool debugMode, String? name) Pointer<SdlGpuDevice>
Creates a GPU context.
sdlCreateGpuDeviceWithProperties(int props) Pointer<SdlGpuDevice>
Creates a GPU context.
sdlCreateGpuGraphicsPipeline(Pointer<SdlGpuDevice> device, Pointer<SdlGpuGraphicsPipelineCreateInfo> createinfo) Pointer<SdlGpuGraphicsPipeline>
Creates a pipeline object to be used in a graphics workflow.
sdlCreateGpuSampler(Pointer<SdlGpuDevice> device, Pointer<SdlGpuSamplerCreateInfo> createinfo) Pointer<SdlGpuSampler>
Creates a sampler object to be used when binding textures in a graphics workflow.
sdlCreateGpuShader(Pointer<SdlGpuDevice> device, Pointer<SdlGpuShaderCreateInfo> createinfo) Pointer<SdlGpuShader>
Creates a shader to be used when creating a graphics pipeline.
sdlCreateGpuTexture(Pointer<SdlGpuDevice> device, Pointer<SdlGpuTextureCreateInfo> createinfo) Pointer<SdlGpuTexture>
Creates a texture object to be used in graphics or compute workflows.
sdlCreateGpuTransferBuffer(Pointer<SdlGpuDevice> device, Pointer<SdlGpuTransferBufferCreateInfo> createinfo) Pointer<SdlGpuTransferBuffer>
Creates a transfer buffer to be used when uploading to or downloading from graphics resources.
sdlDestroyGpuDevice(Pointer<SdlGpuDevice> device) → void
Destroys a GPU context previously returned by SDL_CreateGPUDevice.
sdlDispatchGpuCompute(Pointer<SdlGpuComputePass> computePass, int groupcountX, int groupcountY, int groupcountZ) → void
Dispatches compute work.
sdlDispatchGpuComputeIndirect(Pointer<SdlGpuComputePass> computePass, Pointer<SdlGpuBuffer> buffer, int offset) → void
Dispatches compute work with parameters set from a buffer.
sdlDownloadFromGpuBuffer(Pointer<SdlGpuCopyPass> copyPass, Pointer<SdlGpuBufferRegion> source, Pointer<SdlGpuTransferBufferLocation> destination) → void
Copies data from a buffer to a transfer buffer on the GPU timeline.
sdlDownloadFromGpuTexture(Pointer<SdlGpuCopyPass> copyPass, Pointer<SdlGpuTextureRegion> source, Pointer<SdlGpuTextureTransferInfo> destination) → void
Copies data from a texture to a transfer buffer on the GPU timeline.
sdlDrawGpuIndexedPrimitives(Pointer<SdlGpuRenderPass> renderPass, int numIndices, int numInstances, int firstIndex, int vertexOffset, int firstInstance) → void
Draws data using bound graphics state with an index buffer and instancing enabled.
sdlDrawGpuIndexedPrimitivesIndirect(Pointer<SdlGpuRenderPass> renderPass, Pointer<SdlGpuBuffer> buffer, int offset, int drawCount) → void
Draws data using bound graphics state with an index buffer enabled and with draw parameters set from a buffer.
sdlDrawGpuPrimitives(Pointer<SdlGpuRenderPass> renderPass, int numVertices, int numInstances, int firstVertex, int firstInstance) → void
Draws data using bound graphics state.
sdlDrawGpuPrimitivesIndirect(Pointer<SdlGpuRenderPass> renderPass, Pointer<SdlGpuBuffer> buffer, int offset, int drawCount) → void
Draws data using bound graphics state and with draw parameters set from a buffer.
sdlEndGpuComputePass(Pointer<SdlGpuComputePass> computePass) → void
Ends the current compute pass.
sdlEndGpuCopyPass(Pointer<SdlGpuCopyPass> copyPass) → void
Ends the current copy pass.
sdlEndGpuRenderPass(Pointer<SdlGpuRenderPass> renderPass) → void
Ends the given render pass.
sdlGdkResumeGpu(Pointer<SdlGpuDevice> device) → void
Call this to resume GPU operation on Xbox when you receive the SDL_EVENT_WILL_ENTER_FOREGROUND event.
sdlGdkSuspendGpu(Pointer<SdlGpuDevice> device) → void
Call this to suspend GPU operation on Xbox when you receive the SDL_EVENT_DID_ENTER_BACKGROUND event.
sdlGenerateMipmapsForGpuTexture(Pointer<SdlGpuCommandBuffer> commandBuffer, Pointer<SdlGpuTexture> texture) → void
Generates mipmaps for the given texture.
sdlGetGpuDeviceDriver(Pointer<SdlGpuDevice> device) String?
Returns the name of the backend used to create this GPU context.
sdlGetGpuDriver(int index) String?
Get the name of a built in GPU driver.
sdlGetGpuShaderFormats(Pointer<SdlGpuDevice> device) int
Returns the supported shader formats for this GPU context.
sdlGetGpuSwapchainTextureFormat(Pointer<SdlGpuDevice> device, Pointer<SdlWindow> window) int
Obtains the texture format of the swapchain for the given window.
sdlGetNumGpuDrivers() int
Get the number of GPU drivers compiled into SDL.
sdlGpuSupportsProperties(int props) bool
Checks for GPU runtime support.
sdlGpuSupportsShaderFormats(int formatFlags, String? name) bool
Checks for GPU runtime support.
sdlGpuTextureFormatTexelBlockSize(int format) int
Obtains the texel block size for a texture format.
sdlGpuTextureSupportsFormat(Pointer<SdlGpuDevice> device, int format, int type, int usage) bool
Determines whether a texture format is supported for a given type and usage.
sdlGpuTextureSupportsSampleCount(Pointer<SdlGpuDevice> device, int format, int sampleCount) bool
Determines if a sample count for a texture format is supported.
sdlInsertGpuDebugLabel(Pointer<SdlGpuCommandBuffer> commandBuffer, String? text) → void
Inserts an arbitrary string label into the command buffer callstream.
sdlMapGpuTransferBuffer(Pointer<SdlGpuDevice> device, Pointer<SdlGpuTransferBuffer> transferBuffer, bool cycle) Pointer<NativeType>
Maps a transfer buffer into application address space.
sdlPopGpuDebugGroup(Pointer<SdlGpuCommandBuffer> commandBuffer) → void
Ends the most-recently pushed debug group.
sdlPushGpuComputeUniformData(Pointer<SdlGpuCommandBuffer> commandBuffer, int slotIndex, Pointer<NativeType> data, int length) → void
Pushes data to a uniform slot on the command buffer.
sdlPushGpuDebugGroup(Pointer<SdlGpuCommandBuffer> commandBuffer, String? name) → void
Begins a debug group with an arbitary name.
sdlPushGpuFragmentUniformData(Pointer<SdlGpuCommandBuffer> commandBuffer, int slotIndex, Pointer<NativeType> data, int length) → void
Pushes data to a fragment uniform slot on the command buffer.
sdlPushGpuVertexUniformData(Pointer<SdlGpuCommandBuffer> commandBuffer, int slotIndex, Pointer<NativeType> data, int length) → void
Pushes data to a vertex uniform slot on the command buffer.
sdlQueryGpuFence(Pointer<SdlGpuDevice> device, Pointer<SdlGpuFence> fence) bool
Checks the status of a fence.
sdlReleaseGpuBuffer(Pointer<SdlGpuDevice> device, Pointer<SdlGpuBuffer> buffer) → void
Frees the given buffer as soon as it is safe to do so.
sdlReleaseGpuComputePipeline(Pointer<SdlGpuDevice> device, Pointer<SdlGpuComputePipeline> computePipeline) → void
Frees the given compute pipeline as soon as it is safe to do so.
sdlReleaseGpuFence(Pointer<SdlGpuDevice> device, Pointer<SdlGpuFence> fence) → void
Releases a fence obtained from SDL_SubmitGPUCommandBufferAndAcquireFence.
sdlReleaseGpuGraphicsPipeline(Pointer<SdlGpuDevice> device, Pointer<SdlGpuGraphicsPipeline> graphicsPipeline) → void
Frees the given graphics pipeline as soon as it is safe to do so.
sdlReleaseGpuSampler(Pointer<SdlGpuDevice> device, Pointer<SdlGpuSampler> sampler) → void
Frees the given sampler as soon as it is safe to do so.
sdlReleaseGpuShader(Pointer<SdlGpuDevice> device, Pointer<SdlGpuShader> shader) → void
Frees the given shader as soon as it is safe to do so.
sdlReleaseGpuTexture(Pointer<SdlGpuDevice> device, Pointer<SdlGpuTexture> texture) → void
Frees the given texture as soon as it is safe to do so.
sdlReleaseGpuTransferBuffer(Pointer<SdlGpuDevice> device, Pointer<SdlGpuTransferBuffer> transferBuffer) → void
Frees the given transfer buffer as soon as it is safe to do so.
sdlReleaseWindowFromGpuDevice(Pointer<SdlGpuDevice> device, Pointer<SdlWindow> window) → void
Unclaims a window, destroying its swapchain structure.
sdlSetGpuAllowedFramesInFlight(Pointer<SdlGpuDevice> device, int allowedFramesInFlight) bool
Configures the maximum allowed number of frames in flight.
sdlSetGpuBlendConstants(Pointer<SdlGpuRenderPass> renderPass, SdlFColor blendAnts) → void
Sets the current blend constants on a command buffer.
sdlSetGpuBufferName(Pointer<SdlGpuDevice> device, Pointer<SdlGpuBuffer> buffer, String? text) → void
Sets an arbitrary string constant to label a buffer.
sdlSetGpuScissor(Pointer<SdlGpuRenderPass> renderPass, Pointer<SdlRect> scissor) → void
Sets the current scissor state on a command buffer.
sdlSetGpuStencilReference(Pointer<SdlGpuRenderPass> renderPass, int reference) → void
Sets the current stencil reference value on a command buffer.
sdlSetGpuSwapchainParameters(Pointer<SdlGpuDevice> device, Pointer<SdlWindow> window, int swapchainComposition, int presentMode) bool
Changes the swapchain parameters for the given claimed window.
sdlSetGpuTextureName(Pointer<SdlGpuDevice> device, Pointer<SdlGpuTexture> texture, String? text) → void
Sets an arbitrary string constant to label a texture.
sdlSetGpuViewport(Pointer<SdlGpuRenderPass> renderPass, Pointer<SdlGpuViewport> viewport) → void
Sets the current viewport state on a command buffer.
sdlSubmitGpuCommandBuffer(Pointer<SdlGpuCommandBuffer> commandBuffer) bool
Submits a command buffer so its commands can be processed on the GPU.
sdlSubmitGpuCommandBufferAndAcquireFence(Pointer<SdlGpuCommandBuffer> commandBuffer) Pointer<SdlGpuFence>
Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated with the command buffer.
sdlUnmapGpuTransferBuffer(Pointer<SdlGpuDevice> device, Pointer<SdlGpuTransferBuffer> transferBuffer) → void
Unmaps a previously mapped transfer buffer.
sdlUploadToGpuBuffer(Pointer<SdlGpuCopyPass> copyPass, Pointer<SdlGpuTransferBufferLocation> source, Pointer<SdlGpuBufferRegion> destination, bool cycle) → void
Uploads data from a transfer buffer to a buffer.
sdlUploadToGpuTexture(Pointer<SdlGpuCopyPass> copyPass, Pointer<SdlGpuTextureTransferInfo> source, Pointer<SdlGpuTextureRegion> destination, bool cycle) → void
Uploads data from a transfer buffer to a texture.
sdlWaitAndAcquireGpuSwapchainTexture(Pointer<SdlGpuCommandBuffer> commandBuffer, Pointer<SdlWindow> window, Pointer<Pointer<SdlGpuTexture>> swapchainTexture, Pointer<Uint32> swapchainTextureWidth, Pointer<Uint32> swapchainTextureHeight) bool
Blocks the thread until a swapchain texture is available to be acquired, and then acquires it.
sdlWaitForGpuFences(Pointer<SdlGpuDevice> device, bool waitAll, Pointer<Pointer<SdlGpuFence>> fences, int numFences) bool
Blocks the thread until the given fences are signaled.
sdlWaitForGpuIdle(Pointer<SdlGpuDevice> device) bool
Blocks the thread until the GPU is completely idle.
sdlWaitForGpuSwapchain(Pointer<SdlGpuDevice> device, Pointer<SdlWindow> window) bool
Blocks the thread until a swapchain texture is available to be acquired.
sdlWindowSupportsGpuPresentMode(Pointer<SdlGpuDevice> device, Pointer<SdlWindow> window, int presentMode) bool
Determines whether a presentation mode is supported by the window.
sdlWindowSupportsGpuSwapchainComposition(Pointer<SdlGpuDevice> device, Pointer<SdlWindow> window, int swapchainComposition) bool
Determines whether a swapchain composition is supported by the window.