#ifndef OPEN_GL_H
#define OPEN_GL_H
// Linux Path to OpenGLES2
//#include <GLES2/gl2.h>
#ifdef USE_OPENGLES2
# include <OpenGLES/ES2/gl.h>
# include <OpenGLES/ES2/glext.h>
# include <GLKit/GLKMathTypes.h>
#else
# define GL_GLEXT_PROTOTYPES
# include <GL/gl.h>
# include <GL/glext.h>
# include <GLKMatrix.h>
# define glGenVertexArraysOES glGenVertexArrays
# define glBindVertexArrayOES glBindVertexArray
# define glDeleteVertexArraysOES glDeleteVertexArrays
#endif
//namespace Math
//{
// typedef GLKMatrix4 mat4;
// typedef GLKMatrix3 mat3;
//}
struct mat4 : public GLKMatrix4
{
mat4& operator=(const GLKMatrix4& other)
{
for (int i = 0; i < 16; i++)
m[i] = other.m[i];
return *this;
}
mat4& operator=(const float* other)
{
for (int i = 0; i < 16; i++)
m[i] = other[i];
return *this;
}
};
struct mat3 : public GLKMatrix3
{
mat3& operator=(const float* other)
{
for (int i = 0; i < 9; i++)
m[i] = other[i];
return *this;
}
};
#endif // OPEN_GL_H