From: matthew <matthew@owens.tech>
Date: Sat, 3 Nov 2018 16:21:02 +0000 (+0000)
Subject: updated crpgCameraUpdate to take delta time as a param
X-Git-Url: https://git.owens.tech/projects.html/projects.html/git?a=commitdiff_plain;h=331d07bea8c1c2ff4c4116cc4c954c744484b1b7;p=csrpg.git

updated crpgCameraUpdate to take delta time as a param
---

diff --git a/gl/main.c b/gl/main.c
index 3cc6d91..6084bac 100644
--- a/gl/main.c
+++ b/gl/main.c
@@ -100,9 +100,9 @@ static void initShapes()
 
 static void initView()
 {
-	crpgCameraSetAR((float)screen_width/(float)screen_height);
-	camera = crpgCameraNew(vec3(0,0,4), vec3(0,0,0), vec3(0,1,0));
+	camera = crpgCameraNew(vec3(0,0,3), vec3(0,1,0));
 	crpgCameraSetSpeed(camera, 20);
+
 	crpgCubeSetCamera(cubes[0], crpgCameraGetMat(camera));
 	crpgCubeSetCamera(cubes[1], crpgCameraGetMat(camera));
 
@@ -165,7 +165,7 @@ static void update()
 
 	// Updating physics as many times as we need to consume dt
 	while(crpgTimeStepPhysRequired(physUpdates)){
-		crpgCameraUpdate(camera);
+		crpgCameraUpdate(camera, crpgTimeStepDelta());
 		crpgCubeSetCamera(cubes[0], crpgCameraGetMat(camera));
 		crpgCubeSetCamera(cubes[1], crpgCameraGetMat(camera));
 		physUpdates++;