Commit 11a8de82 authored by Anakin's avatar Anakin
Browse files

fixed interaction bug

parent ee73c16e
......@@ -10,7 +10,7 @@ class OpenGLController
////////////////////////////////////////////////////////////////////////////////////////////
// constructor/destructor
public:
static OpenGLController& getInstance(int oglMajor = 4, int oglMinor = 5);
static OpenGLController* getInstance(int oglMajor = 4, int oglMinor = 5);
~OpenGLController();
private:
......
......@@ -16,9 +16,9 @@
/////////////////////////////////////////////////////////////////////////
// public constructor/destructor
OpenGLController& OpenGLController::getInstance(int oglMajor, int oglMinor)
OpenGLController* OpenGLController::getInstance(int oglMajor, int oglMinor)
{
static OpenGLController instace(oglMajor, oglMinor);
static OpenGLController *instace = new OpenGLController(oglMajor, oglMinor);
return instace;
}
......
......@@ -6,13 +6,13 @@
int main(int argc, char** argv)
{
OpenGLController scene = OpenGLController::getInstance();
//scene.loadMsh("");
OpenGLController *scene = OpenGLController::getInstance();
do {
scene.updateScene();
} while (!glfwWindowShouldClose(scene.getWindow()));
scene->updateScene();
} while (!glfwWindowShouldClose(scene->getWindow()));
delete scene;
return 0;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment