quick backup
[demo] / src / main.cc
index 3c75e31..50eea41 100644 (file)
@@ -3,11 +3,14 @@
 #include <string.h>
 #include <vector>
 
+#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