From 1e75db817c3bef320b57e3c8ef608715f36550a7 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Thu, 8 Feb 2024 08:09:11 -0800 Subject: Address TODO. --- game/src/plugins/gltf_view.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'game/src/plugins') diff --git a/game/src/plugins/gltf_view.c b/game/src/plugins/gltf_view.c index 4ffdd1e..7c73844 100644 --- a/game/src/plugins/gltf_view.c +++ b/game/src/plugins/gltf_view.c @@ -186,13 +186,24 @@ void render(const Game* game, const State* state) { assert(state->scene); assert(state->camera); - ImmRenderer* imm = gfx_get_imm_renderer(game->gfx); + RenderBackend* render_backend = gfx_get_render_backend(game->gfx); + ImmRenderer* imm = gfx_get_imm_renderer(game->gfx); + assert(render_backend); assert(imm); + + gfx_set_blending(render_backend, true); + gfx_set_depth_mask(render_backend, false); + gfx_set_polygon_offset(render_backend, 0.5f, 0.5f); + gfx_imm_start(imm); gfx_imm_set_camera(imm, gfx_get_camera_camera(state->camera)); gfx_imm_set_colour(imm, vec4_make(0.2, 0.2, 1.0, 0.3)); render_bounding_boxes(imm, gfx_get_scene_root(state->scene)); gfx_imm_end(imm); + + gfx_set_polygon_offset(render_backend, 0.0f, 0.0f); + gfx_set_depth_mask(render_backend, true); + gfx_set_blending(render_backend, false); } void resize(Game* game, State* state, int width, int height) { -- cgit v1.2.3