transparent-cube

Minimal cross-platform native/wasm graphics example.
Log | Files | Refs | README | LICENSE

commit 273516680dbfb71b74c416fb27388689c1ac8149
parent b5e702d09d771692990f01bfa54e90a95bcd72fd
Author: Amin Mesbah <dev@aminmesbah.com>
Date:   Sat, 15 Jun 2019 12:00:43 -0700

Remove more unused code

Diffstat:
Msrc/game.c | 31-------------------------------
1 file changed, 0 insertions(+), 31 deletions(-)

diff --git a/src/game.c b/src/game.c @@ -10,7 +10,6 @@ #include "glad/glad.h" #endif - #ifdef PLATFORM_HOTLOAD_GAME_CODE void game_load_opengl_symbols(void) { @@ -18,34 +17,6 @@ void game_load_opengl_symbols(void) } #endif - -float wrap(float n, float min, float max) -{ - if (n > max) - { - return min; - } - else if (n < min) - { - return max; - } - else - { - return n; - } -} - - -float randf(float min, float max) -{ - assert(min < max); - float random = ((float) rand()) / (float) RAND_MAX; - float diff = max - min; - float r = random * diff; - return min + r; -} - - void game_init(struct GameState *game_state, uint32_t screen_width, uint32_t screen_height) { // load cube vertex data @@ -109,7 +80,6 @@ void game_init(struct GameState *game_state, uint32_t screen_width, uint32_t scr #endif } - void game_update_and_render(struct GameState *game_state, float dt, uint32_t screen_width, uint32_t screen_height) { glDepthMask(GL_TRUE); @@ -157,7 +127,6 @@ void game_update_and_render(struct GameState *game_state, float dt, uint32_t scr } } - void game_cleanup(struct GameState *game_state) { glDeleteVertexArrays(1, &game_state->cube_vao);