fixed interaction bug
This commit is contained in:
parent
ee73c16e1f
commit
11a8de82d4
|
@ -10,7 +10,7 @@ class OpenGLController
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// constructor/destructor
|
// constructor/destructor
|
||||||
public:
|
public:
|
||||||
static OpenGLController& getInstance(int oglMajor = 4, int oglMinor = 5);
|
static OpenGLController* getInstance(int oglMajor = 4, int oglMinor = 5);
|
||||||
~OpenGLController();
|
~OpenGLController();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// public constructor/destructor
|
// 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;
|
return instace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
OpenGLController scene = OpenGLController::getInstance();
|
OpenGLController *scene = OpenGLController::getInstance();
|
||||||
|
|
||||||
//scene.loadMsh("");
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
scene.updateScene();
|
scene->updateScene();
|
||||||
} while (!glfwWindowShouldClose(scene.getWindow()));
|
} while (!glfwWindowShouldClose(scene->getWindow()));
|
||||||
|
|
||||||
|
delete scene;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue