commit a853d1f2b1d8cbc02aaa6ed59d20d9c8bb0efa3e
parent 353eccaa7d05e4545bb3d68ee59b3a4f0bdea0f9
Author: amin <dev@aminmesbah.com>
Date: Sat, 6 Jul 2019 02:46:26 +0000
Use eigengrau for the background color
FossilOrigin-Name: be7e0408b7cd67d8f88994eeddd9093711ce2b8fc82b82feda8fd8b6decf4986
Diffstat:
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/am_math.h b/src/am_math.h
@@ -270,6 +270,16 @@ internal inline v3 math_v3_s(v3 vec1, v3 vec2)
return math_v3_a(vec1, math_v3_negate(vec2));
}
+internal inline v3 math_v3_from_rgb(i32 rgb)
+{
+ v3 result = {
+ .x = ((rgb >> 16) & 0xFF) / 255.0f,
+ .y = ((rgb >> 8) & 0xFF) / 255.0f,
+ .z = ((rgb >> 0) & 0xFF) / 255.0f,
+ };
+ return result;
+}
+
internal inline bool math_v4v4_eq(v4 vec1, v4 vec2)
{
for (u8 i = 0; i < 4; ++i)
diff --git a/src/game.c b/src/game.c
@@ -597,7 +597,7 @@ void game_update_and_render(struct GameMemory *game_memory, struct GameInput *ga
}
else
{
- color = (v3) {0.3f, 0.3f, 0.3f};
+ color = (math_v3_from_rgb(0x16161D));
}
renderer_job_enqueue(
@@ -613,6 +613,7 @@ void game_update_and_render(struct GameMemory *game_memory, struct GameInput *ga
}
}
+#if 0
// texture test
{
m4 model = math_m4_init_id();
@@ -634,6 +635,7 @@ void game_update_and_render(struct GameMemory *game_memory, struct GameInput *ga
.layer = RENDER_LAYER_DEBUG,
});
}
+#endif
renderer_jobs_sort(&game_state->renderer, &game_state->world_allocator);
renderer_jobs_draw(&game_state->renderer);