aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorjvech <jmvalenciae@unal.edu.co>2022-11-26 08:40:24 -0500
committerjvech <jmvalenciae@unal.edu.co>2022-11-26 08:40:24 -0500
commitfafff7a4e32dcd63e5b33358414d0fa37305f458 (patch)
tree51580004de076f0cd2dfb0343be3608d8356cd9b /src/main.c
parent02b8093bf0c09b838650f96d3d86be5d3231490e (diff)
feat: obj scale is now possible
There is still features to add
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index c270a2e..c9ffad2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -118,6 +118,10 @@ processCameraInput(GLFWwindow *window, struct Camera *camObj, float deltaTime)
camObj->position = linearVec3Add(camObj->position, tmp);
}
+ if (glfwGetKey(window, GLFW_KEY_DOWN)) scale -= 0.1 * speed;
+ if (glfwGetKey(window, GLFW_KEY_UP)) scale += 0.1 * speed;
+ if (glfwGetKey(window, GLFW_KEY_ENTER)) scale = 1;
+
/*
* Mouse Input
*/
@@ -331,7 +335,7 @@ int main(int argc, char *argv[])
proj = linearPerspective(35, (float)width / height, 0.1, 100);
T = linearTranslate(0.0, 0.0, 0.0);
R = linearRotate(0, 1.0, 0.0, 0.0);
- S = linearScale(1, 1, 1);
+ S = linearScale(scale, scale, scale);
model = linearMat4Muln(3, T, R, S);
glUseProgram(shader);
Feel free to download, copy and edit any repo