diff options
| author | Xander Swan <no email> | 2025-12-05 23:16:27 -0500 |
|---|---|---|
| committer | Xander Swan <no email> | 2025-12-05 23:16:27 -0500 |
| commit | 248a0977f2eb42c308a2430b28b691b75ad1a10d (patch) | |
| tree | 2bb764375a9fc71f07c49a6084648ed288a7948d /src/draw | |
| parent | 703100ed74e7655c266644dafb23e64ba79e5346 (diff) | |
display some debug information
Diffstat (limited to 'src/draw')
| -rw-r--r-- | src/draw/draw.odin | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/draw/draw.odin b/src/draw/draw.odin index 1762b25..6c013de 100644 --- a/src/draw/draw.odin +++ b/src/draw/draw.odin @@ -5,6 +5,7 @@ import "core:math" import sg "shared:sokol/gfx" import sapp "shared:sokol/app" +import sdtxt "shared:sokol/debugtext" import sglue "shared:sokol/glue" Vec2 :: [2]f32 @@ -92,6 +93,12 @@ init :: proc(r: ^Renderer) { r.sampler = sg.make_sampler({}) r.tint = {1, 1, 1, 1} + + sdtxt.set_context(sdtxt.make_context({ + color_format = .RGBA8, + depth_format = .NONE, + sample_count = 1, + })) } deinit :: proc(r: ^Renderer) { @@ -118,6 +125,8 @@ end_frame :: proc(r: ^Renderer) { flush_current_batch(r) clear(&r.current_batch.vertices) + sdtxt.draw() + framebuffer_draw_end(r.screen) r.projection = linalg.matrix_ortho3d( |
