summaryrefslogtreecommitdiff
path: root/game/src/plugins/gltf_view.c
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-02-08 08:09:11 -0800
committer3gg <3gg@shellblade.net>2024-02-08 08:09:11 -0800
commit1e75db817c3bef320b57e3c8ef608715f36550a7 (patch)
tree3620779de1369541c4b98dece2eb783cf3310781 /game/src/plugins/gltf_view.c
parentd130c2c7314cf4884f444db16d7717b7356b54ff (diff)
Address TODO.
Diffstat (limited to 'game/src/plugins/gltf_view.c')
-rw-r--r--game/src/plugins/gltf_view.c13
1 files changed, 12 insertions, 1 deletions
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) {
186 assert(state->scene); 186 assert(state->scene);
187 assert(state->camera); 187 assert(state->camera);
188 188
189 ImmRenderer* imm = gfx_get_imm_renderer(game->gfx); 189 RenderBackend* render_backend = gfx_get_render_backend(game->gfx);
190 ImmRenderer* imm = gfx_get_imm_renderer(game->gfx);
191 assert(render_backend);
190 assert(imm); 192 assert(imm);
193
194 gfx_set_blending(render_backend, true);
195 gfx_set_depth_mask(render_backend, false);
196 gfx_set_polygon_offset(render_backend, 0.5f, 0.5f);
197
191 gfx_imm_start(imm); 198 gfx_imm_start(imm);
192 gfx_imm_set_camera(imm, gfx_get_camera_camera(state->camera)); 199 gfx_imm_set_camera(imm, gfx_get_camera_camera(state->camera));
193 gfx_imm_set_colour(imm, vec4_make(0.2, 0.2, 1.0, 0.3)); 200 gfx_imm_set_colour(imm, vec4_make(0.2, 0.2, 1.0, 0.3));
194 render_bounding_boxes(imm, gfx_get_scene_root(state->scene)); 201 render_bounding_boxes(imm, gfx_get_scene_root(state->scene));
195 gfx_imm_end(imm); 202 gfx_imm_end(imm);
203
204 gfx_set_polygon_offset(render_backend, 0.0f, 0.0f);
205 gfx_set_depth_mask(render_backend, true);
206 gfx_set_blending(render_backend, false);
196} 207}
197 208
198void resize(Game* game, State* state, int width, int height) { 209void resize(Game* game, State* state, int width, int height) {