implement singleton pattern

This commit is contained in:
Anakin
2016-09-07 12:46:34 +02:00
parent e7d7bec608
commit f824f4eb4c
3 changed files with 29 additions and 26 deletions

View File

@@ -8,10 +8,13 @@
class OpenGLController
{
public:
OpenGLController();
OpenGLController(int oglMajor, int oglMinor);
static OpenGLController& getInstance(int oglMajor = 4, int oglMinor = 5);
~OpenGLController();
private:
OpenGLController() {};
OpenGLController(int oglMajor, int oglMinor);
private:
int iOglMajorVersion;
int iOglMinorVersion;
@@ -30,7 +33,7 @@ private:
glm::mat4 m4x4Model;
glm::mat4 m4x4MVP;
Camera camera;
Camera* camera;
Object* object;
struct {