summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author0scar <qgt268@alumni.ku.dk>2024-02-13 09:54:57 +0000
committer0scar <qgt268@alumni.ku.dk>2024-02-13 09:57:32 +0000
commit01d731faf563c691838c990adceff66783ee79d9 (patch)
tree99bed1d59142a568e2fe0e4399dca30e9bb9f481 /src
parentac61a7522076e0998985e7200f40cd584e2b5124 (diff)
Fix FOV
Diffstat (limited to 'src')
-rw-r--r--src/core/src/loop.c14
-rw-r--r--src/rendering/src/rendering.c2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/core/src/loop.c b/src/core/src/loop.c
index e8dfc47..eea40eb 100644
--- a/src/core/src/loop.c
+++ b/src/core/src/loop.c
@@ -318,8 +318,8 @@ i32 engine_run(Platform* p, StateType initial_state, void* state_arg) {
StateType (*update_func)(f64,void*) = State_updateFunc(state);
- f64 last_fps_measurement = get_time();
- f64 last_fps_ticks = 0;
+ //f64 last_fps_measurement = get_time();
+ //f64 last_fps_ticks = 0;
/* Main loop */
do {
@@ -327,11 +327,11 @@ i32 engine_run(Platform* p, StateType initial_state, void* state_arg) {
const f64 dt = now - time;
time = now;
- if (now - last_fps_measurement > 1.000) {
- printf("\n FPS: %.1f \t ticks: %lu", (double)(ticks - last_fps_ticks) / (now - last_fps_measurement), ticks);
- last_fps_measurement = now;
- last_fps_ticks = ticks;
- }
+ //if (now - last_fps_measurement > 1.000) {
+ // printf("\n FPS: %.1f \t ticks: %lu", (double)(ticks - last_fps_ticks) / (now - last_fps_measurement), ticks);
+ // last_fps_measurement = now;
+ // last_fps_ticks = ticks;
+ //}
glfwPollEvents();
/* Events */
diff --git a/src/rendering/src/rendering.c b/src/rendering/src/rendering.c
index 0a847d0..fc0d27b 100644
--- a/src/rendering/src/rendering.c
+++ b/src/rendering/src/rendering.c
@@ -162,7 +162,7 @@ void r_perspective(f32 fov, Camera *c) {
c->type = Camera_Perspective;
c->parameters.perspective.fov = fov;
- glm_perspective(fov , ratio, 0.1, 100.0f, c->per);
+ glm_perspective(glm_rad(fov), ratio, 0.1, 100.0f, c->per);
}
void r_perspective_ortho(f32 sz, Camera *c) {