Browse Source

Make the rotation a bit more evident.

master
Amber 2 years ago
parent
commit
eef6e76aae
  1. 8
      src/main.c

8
src/main.c

@ -1582,7 +1582,7 @@ void init_vulkan(ApplicationState* state) { @@ -1582,7 +1582,7 @@ void init_vulkan(ApplicationState* state) {
void update_uniform_buffer(ApplicationState* state, uint32_t current_frame) {
uint64_t time = clock() / (CLOCKS_PER_SEC / 1000);
time = 0;
// time = 0;
UBO ubo = {0};
glm_mat4_identity(ubo.model);
@ -1590,10 +1590,10 @@ void update_uniform_buffer(ApplicationState* state, uint32_t current_frame) { @@ -1590,10 +1590,10 @@ void update_uniform_buffer(ApplicationState* state, uint32_t current_frame) {
glm_mat4_identity(ubo.proj);
glm_mat4_identity(ubo.model);
vec3 axis = {0.0f, 1.0f, 1.0f};
glm_rotate(ubo.model, time * glm_rad(90.0f), axis);
vec3 axis = {0.0f, 0.0f, 1.0f};
glm_rotate(ubo.model, time * glm_rad(20.0f), axis);
vec3 eye = {2.0f, 2.0f, 2.0f};
vec3 eye = {1.0f, 2.0f, 2.0f};
vec3 center = {0.0f, 0.0f, 0.0f};
vec3 up = {0.0f, 0.0f, 1.0f};
glm_lookat(eye, center, up, ubo.view);

Loading…
Cancel
Save