diff options
Diffstat (limited to 'gltfview/src')
-rw-r--r-- | gltfview/src/game.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gltfview/src/game.c b/gltfview/src/game.c index d618447..5ca9ad4 100644 --- a/gltfview/src/game.c +++ b/gltfview/src/game.c | |||
@@ -130,7 +130,10 @@ void game_update(Game* game, double t, double dt) { | |||
130 | } | 130 | } |
131 | 131 | ||
132 | void game_render(const Game* game) { | 132 | void game_render(const Game* game) { |
133 | Renderer* renderer = gfx_get_renderer(game->gfx); | 133 | RenderBackend* render_backend = gfx_get_render_backend(game->gfx); |
134 | Renderer* renderer = gfx_get_renderer(game->gfx); | ||
135 | |||
136 | gfx_start_frame(render_backend); | ||
134 | 137 | ||
135 | gfx_render_scene( | 138 | gfx_render_scene( |
136 | renderer, | 139 | renderer, |
@@ -142,6 +145,8 @@ void game_render(const Game* game) { | |||
142 | void* plugin_state = get_plugin_state(game->plugin); | 145 | void* plugin_state = get_plugin_state(game->plugin); |
143 | plugin_call(game->plugin, plugin_render, "render", plugin_state, game); | 146 | plugin_call(game->plugin, plugin_render, "render", plugin_state, game); |
144 | } | 147 | } |
148 | |||
149 | gfx_end_frame(render_backend); | ||
145 | } | 150 | } |
146 | 151 | ||
147 | void game_set_viewport(Game* game, int width, int height) { | 152 | void game_set_viewport(Game* game, int width, int height) { |