diff options
author | jvech <jmvalenciae@unal.edu.co> | 2022-10-31 10:28:50 -0500 |
---|---|---|
committer | jvech <jmvalenciae@unal.edu.co> | 2022-10-31 10:28:50 -0500 |
commit | 1915909047d2a00c898106e4173c76b171368f38 (patch) | |
tree | 79d89454070a923162c667e8c4ef509993e25acd /src/main.c | |
parent | 947ecc07b307b649f3380898923a21a303aa0b6a (diff) |
fix: blank lines segmentation fault bug fixed
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -306,14 +306,22 @@ int main(int argc, char *argv[]) Mat4 T, S, R; float t, t0, dt; int width, height; + char title[1024]; t0 = 0; glEnable(GL_DEPTH_TEST); while (!glfwWindowShouldClose(window)) { processInput(window); - glClearColor(0.5f, 0.5f, 0.5f, 1.0f); + glClearColor(0.7f, 0.7f, 0.7f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glfwGetWindowSize(window, &width, &height); + sprintf(title, "mverse: x: %f y: %f z: %f", + mainCamera.front.vector[0] + mainCamera.position.vector[0], + mainCamera.front.vector[1] + mainCamera.position.vector[1], + mainCamera.front.vector[2] + mainCamera.position.vector[2]); + glfwSetWindowTitle(window, title); + + t = (float)glfwGetTime(); dt = t - t0; |