diff options
Diffstat (limited to 'game/src/plugins')
-rw-r--r-- | game/src/plugins/gltf_view.c | 13 |
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 | ||
198 | void resize(Game* game, State* state, int width, int height) { | 209 | void resize(Game* game, State* state, int width, int height) { |