diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2018-04-30 12:46:02 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2018-04-30 12:46:02 +0100 |
commit | 60c18086bc2657cdf8d3aab80fdae4ad52172a73 (patch) | |
tree | 7877d1b80875d121c6d8d4fa37580fcce54f58bf | |
parent | aa41081573dab5679c8b01faac4aedd32f6faa88 (diff) | |
download | faqe-60c18086bc2657cdf8d3aab80fdae4ad52172a73.tar.gz faqe-60c18086bc2657cdf8d3aab80fdae4ad52172a73.tar.xz faqe-60c18086bc2657cdf8d3aab80fdae4ad52172a73.zip |
Store camera position in a variable for now.
-rw-r--r-- | faqe.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -42,6 +42,7 @@ int main(int argc, char **argv) FILE *cube_file; struct fmd cube_fmd; struct model cube_model; + vec3 pos = { 0, 0, 3 }; setprogname(argc >= 1 && argv[0] != NULL ? argv[0] : "faqe"); @@ -96,7 +97,7 @@ int main(int argc, char **argv) secs = SDL_GetTicks() * 0.0001; - mat4x4_look_at(view, (vec3){ 0, 0, 3 }, (vec3){ 0, 0, 0 }, (vec3){ 0, 1, 0 }); + mat4x4_look_at(view, pos, (vec3){ 0, 0, 0 }, (vec3){ 0, 1, 0 }); gl_uni_setm4fv(uni.view, 1, GL_FALSE, view[0]); while (SDL_PollEvent(&ev)) { |