summaryrefslogtreecommitdiff
path: root/game/src/plugins/viewer.c
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-03-09 09:29:52 -0800
committer3gg <3gg@shellblade.net>2024-03-09 09:29:52 -0800
commit88ab79e436aec6ede0fca4949570f534ffb1b853 (patch)
tree4b362ac106f8cc7aa49013cad9d288aba6b1d4d2 /game/src/plugins/viewer.c
parentf9e38bf24e1874d773083d06ca443cce9bd92d56 (diff)
Rename RenderBackend -> GfxCore.
Diffstat (limited to 'game/src/plugins/viewer.c')
-rw-r--r--game/src/plugins/viewer.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/game/src/plugins/viewer.c b/game/src/plugins/viewer.c
index 5e8d7d3..f621b00 100644
--- a/game/src/plugins/viewer.c
+++ b/game/src/plugins/viewer.c
@@ -58,14 +58,14 @@ static SceneNode* load_skyquad(Gfx* gfx, SceneNode* root) {
58 assert(gfx); 58 assert(gfx);
59 assert(root); 59 assert(root);
60 60
61 RenderBackend* render_backend = gfx_get_render_backend(gfx); 61 GfxCore* gfxcore = gfx_get_core(gfx);
62 62
63 const Texture* environment_map = load_environment_map(gfx); 63 const Texture* environment_map = load_environment_map(gfx);
64 if (!environment_map) { 64 if (!environment_map) {
65 return 0; 65 return 0;
66 } 66 }
67 67
68 return gfx_setup_skyquad(render_backend, root, environment_map); 68 return gfx_setup_skyquad(gfxcore, root, environment_map);
69} 69}
70 70
71/// Load the 3D scene. 71/// Load the 3D scene.
@@ -222,17 +222,17 @@ static void render_bounding_boxes(const Game* game, const State* state) {
222 assert(game); 222 assert(game);
223 assert(state); 223 assert(state);
224 224
225 RenderBackend* render_backend = gfx_get_render_backend(game->gfx); 225 GfxCore* gfxcore = gfx_get_core(game->gfx);
226 ImmRenderer* imm = gfx_get_imm_renderer(game->gfx); 226 ImmRenderer* imm = gfx_get_imm_renderer(game->gfx);
227 assert(render_backend); 227 assert(gfxcore);
228 assert(imm); 228 assert(imm);
229 229
230 const mat4 id = mat4_id(); 230 const mat4 id = mat4_id();
231 Anima* anima = 0; 231 Anima* anima = 0;
232 232
233 gfx_set_blending(render_backend, true); 233 gfx_set_blending(gfxcore, true);
234 gfx_set_depth_mask(render_backend, false); 234 gfx_set_depth_mask(gfxcore, false);
235 gfx_set_polygon_offset(render_backend, -1.5f, -1.0f); 235 gfx_set_polygon_offset(gfxcore, -1.5f, -1.0f);
236 236
237 gfx_imm_start(imm); 237 gfx_imm_start(imm);
238 gfx_imm_set_camera(imm, gfx_get_camera_camera(state->camera)); 238 gfx_imm_set_camera(imm, gfx_get_camera_camera(state->camera));
@@ -240,9 +240,9 @@ static void render_bounding_boxes(const Game* game, const State* state) {
240 render_bounding_boxes_rec(imm, anima, &id, gfx_get_scene_root(state->scene)); 240 render_bounding_boxes_rec(imm, anima, &id, gfx_get_scene_root(state->scene));
241 gfx_imm_end(imm); 241 gfx_imm_end(imm);
242 242
243 gfx_reset_polygon_offset(render_backend); 243 gfx_reset_polygon_offset(gfxcore);
244 gfx_set_depth_mask(render_backend, true); 244 gfx_set_depth_mask(gfxcore, true);
245 gfx_set_blending(render_backend, false); 245 gfx_set_blending(gfxcore, false);
246} 246}
247 247
248void render(const Game* game, const State* state) { 248void render(const Game* game, const State* state) {