Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 187ef2b

Browse files
committedFeb 27, 2025
Add renderDebugText
1 parent 8815a65 commit 187ef2b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

Diff for: ‎src/sdl3.zig

+6
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ pub const Renderer = opaque {
430430
pub const create = createRenderer;
431431
pub const destroy = destroyRenderer;
432432
pub const present = renderPresent;
433+
pub const debugText = renderDebugText;
433434
};
434435

435436
/// Get the number of 2D rendering drivers available for the current display.
@@ -765,6 +766,11 @@ extern fn SDL_RenderReadPixels(
765766
pitch: c_int,
766767
) c_int;
767768

769+
pub fn renderDebugText(renderer: *Renderer, x: f32, y: f32, str: [*:0]const u8) bool {
770+
return SDL_RenderDebugText(renderer, x, y, str) == True;
771+
}
772+
extern fn SDL_RenderDebugText(renderer: *Renderer, x: f32, y: f32, str: [*:0]const u8) Bool;
773+
768774
//--------------------------------------------------------------------------------------------------
769775
//
770776
// Pixel Formats and Conversion Routines (SDL_pixels.h)

0 commit comments

Comments
 (0)
Please sign in to comment.