sdlInsertGpuDebugLabel function
Inserts an arbitrary string label into the command buffer callstream.
Useful for debugging.
\param command_buffer a command buffer. \param text a UTF-8 string constant to insert as the label.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC void SDLCALL SDL_InsertGPUDebugLabel( SDL_GPUCommandBuffer *command_buffer, const char *text)
Implementation
void sdlInsertGpuDebugLabel(
Pointer<SdlGpuCommandBuffer> commandBuffer, String? text) {
final sdlInsertGpuDebugLabelLookupFunction = libSdl3.lookupFunction<
Void Function(
Pointer<SdlGpuCommandBuffer> commandBuffer, Pointer<Utf8> text),
void Function(Pointer<SdlGpuCommandBuffer> commandBuffer,
Pointer<Utf8> text)>('SDL_InsertGPUDebugLabel');
final textPointer = text != null ? text.toNativeUtf8() : nullptr;
final result =
sdlInsertGpuDebugLabelLookupFunction(commandBuffer, textPointer);
calloc.free(textPointer);
return result;
}