X-Git-Url: https://eleni.mutantstargoat.com/git/?p=demo;a=blobdiff_plain;f=src%2Fmain.cc;h=50eea418a7b8aff72e0c93ff0986feba69e5f041;hp=3c75e319058873282fa685025fdad414f5fed6b1;hb=fcd6773bc770425ede4b47a84eef7cc78342542c;hpb=4bc86b416f29b4889075ad5c8dfdb1e11454a6c3 diff --git a/src/main.cc b/src/main.cc index 3c75e31..50eea41 100644 --- a/src/main.cc +++ b/src/main.cc @@ -3,11 +3,14 @@ #include #include +#include "global.h" + /* TODO: fix those */ #include "camera.h" #include "mesh.h" #include "object.h" #include "scene.h" +#include "shader_manager.h" #include "opengl/opengl.h" #include "vulkan/vk.h" @@ -31,6 +34,7 @@ int win_w = 800; int win_h = 600; OrbitCamera *camera; +ShaderManager *sdr_man; /* variables */ static float phi = 25; @@ -94,6 +98,8 @@ static bool init() return false; } + sdr_man = new ShaderManager; + camera = new OrbitCamera; camera->set_orbit_params(phi, theta, dist); @@ -114,14 +120,15 @@ static bool init() static void cleanup() { + delete sdr_man; + delete camera; + if(use_vulkan) { cleanup_vulkan(); } else { cleanup_opengl(); } - - delete camera; } static void key_clbk(GLFWwindow *win, int key, int scancode, int action, int mods) @@ -173,7 +180,6 @@ static void display() } else { display_opengl(); - scene.objects[0]->mesh->update_vertex_data(); scene.objects[0]->mesh->draw(); } } \ No newline at end of file