summaryrefslogtreecommitdiff
path: root/gltfview/src
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2023-01-05 16:35:11 -0800
committer3gg <3gg@shellblade.net>2023-01-05 16:35:11 -0800
commit7e51dc8b4ea8e39357263a7bd70746aad2f5b7f3 (patch)
tree748395eea3666ca08c8e297d9cb0000b27f22e10 /gltfview/src
parent47d6a4d1c2973664dc79edd0043fe63dd1e369c6 (diff)
Let the scene loader compile shader computations.
Diffstat (limited to 'gltfview/src')
-rw-r--r--gltfview/src/game.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gltfview/src/game.c b/gltfview/src/game.c
index f2e5a88..bd474d6 100644
--- a/gltfview/src/game.c
+++ b/gltfview/src/game.c
@@ -37,6 +37,7 @@ static const char* DAMAGED_HELMET =
37 37
38static const char* CLOUDS1_TEXTURE = "/assets/skybox/clouds1/clouds1_west.bmp"; 38static const char* CLOUDS1_TEXTURE = "/assets/skybox/clouds1/clouds1_west.bmp";
39 39
40// TODO: Move this debug rendering to the renderer.
40static ShaderProgram* load_shader( 41static ShaderProgram* load_shader(
41 RenderBackend* render_backend, const char* view_mode) { 42 RenderBackend* render_backend, const char* view_mode) {
42 ShaderProgram* shader = 0; 43 ShaderProgram* shader = 0;
@@ -147,13 +148,14 @@ static bool load_scene(
147 return false; 148 return false;
148 } 149 }
149 150
150 ShaderProgram* shader = load_shader(game->render_backend, view_mode); 151 // TODO: Move the debug rendering to the renderer.
151 if (!shader) { 152 // ShaderProgram* shader = load_shader(game->render_backend, view_mode);
152 return false; 153 // if (!shader) {
153 } 154 // return false;
155 // }
154 156
155 if (!gfx_load_scene( 157 if (!gfx_load_scene(
156 game->gfx, sky_node, shader, 158 game->gfx, sky_node,
157 &(LoadSceneCmd){ 159 &(LoadSceneCmd){
158 .origin = SceneFromFile, .filepath = scene_filepath})) { 160 .origin = SceneFromFile, .filepath = scene_filepath})) {
159 return false; 161 return false;