summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrNuget <drnuget@outlook.com>2026-01-04 22:20:13 +0200
committerDrNuget <drnuget@outlook.com>2026-01-04 22:20:13 +0200
commit41151e671e00790853a555ecb5d0603600c879da (patch)
treee7996929abf8d7f77c6f3e56567d27b43b7a8d05
parent510f1bac9b71ba240d30bb5bc5df6501e70fafc9 (diff)
downloadopengl-test-41151e671e00790853a555ecb5d0603600c879da.tar.gz
some changes i forgot to addHEADmaster
-rw-r--r--src/main.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index eb655b7..c168e6f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -60,9 +60,9 @@ int killGame(Game* game)
return 0;
}
-void setupProjection(Game* game)
+void setupProjection(float fov, Game* game)
{
- glm_perspective(90.0f, ((float)game->window_width)/((float)game->window_height), 0.1f, 40.0f, game->projection);
+ glm_perspective(fov, ((float)game->window_width)/((float)game->window_height), 0.1f, 40.0f, game->projection);
glUniformMatrix4fv(game->projection_loc, 1, GL_FALSE, (float*)game->projection);
}
@@ -118,14 +118,12 @@ int main()
game.transform_loc = glGetUniformLocation(shader_program, "model");
game.projection_loc = glGetUniformLocation(shader_program, "projection");
- SDL_Time time;
-
// Enable/disable wireframe rendering:
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glUseProgram(shader_program);
- setupProjection(&game);
+ setupProjection(90.0f, &game);
bindViewModel(&pengerModel);
while (game.running) {