forked from organicmaps/organicmaps
[drape] new functions and constants
This commit is contained in:
parent
858e6ed7ff
commit
b84d96b979
4 changed files with 62 additions and 7 deletions
|
@ -26,15 +26,26 @@ namespace GLConst
|
|||
const glConst GLFloatType = GL_FLOAT;
|
||||
const glConst GLDoubleType = GL_DOUBLE;
|
||||
|
||||
extern const glConst GLFloatVec2 = GL_FLOAT_VEC2;
|
||||
extern const glConst GLFloatVec3 = GL_FLOAT_VEC3;
|
||||
extern const glConst GLFloatVec4 = GL_FLOAT_VEC4;
|
||||
const glConst GLFloatVec2 = GL_FLOAT_VEC2;
|
||||
const glConst GLFloatVec3 = GL_FLOAT_VEC3;
|
||||
const glConst GLFloatVec4 = GL_FLOAT_VEC4;
|
||||
|
||||
extern const glConst GLIntVec2 = GL_INT_VEC2;
|
||||
extern const glConst GLIntVec3 = GL_INT_VEC3;
|
||||
extern const glConst GLIntVec4 = GL_INT_VEC4;
|
||||
const glConst GLIntVec2 = GL_INT_VEC2;
|
||||
const glConst GLIntVec3 = GL_INT_VEC3;
|
||||
const glConst GLIntVec4 = GL_INT_VEC4;
|
||||
|
||||
extern const glConst GLFloatMat4 = GL_FLOAT_MAT4;
|
||||
const glConst GLFloatMat4 = GL_FLOAT_MAT4;
|
||||
|
||||
const glConst GLDepthTest = GL_DEPTH_TEST;
|
||||
|
||||
const glConst GLNever = GL_NEVER;
|
||||
const glConst GLLess = GL_LESS;
|
||||
const glConst GLEqual = GL_EQUAL;
|
||||
const glConst GLLessOrEqual = GL_LEQUAL;
|
||||
const glConst GLGreat = GL_GREATER;
|
||||
const glConst GLNotEqual = GL_NOTEQUAL;
|
||||
const glConst GLGreatOrEqual = GL_GEQUAL;
|
||||
const glConst GLAlways = GL_ALWAYS;
|
||||
|
||||
const glConst GLActiveUniforms = GL_ACTIVE_UNIFORMS;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,19 @@ namespace GLConst
|
|||
extern const glConst GLFloatMat4;
|
||||
|
||||
|
||||
/// OpenGL states
|
||||
extern const glConst GLDepthTest;
|
||||
|
||||
/// OpenGL depth functions
|
||||
extern const glConst GLNever;
|
||||
extern const glConst GLLess;
|
||||
extern const glConst GLEqual;
|
||||
extern const glConst GLLessOrEqual;
|
||||
extern const glConst GLGreat;
|
||||
extern const glConst GLNotEqual;
|
||||
extern const glConst GLGreatOrEqual;
|
||||
extern const glConst GLAlways;
|
||||
|
||||
// Program object parameter names
|
||||
extern const glConst GLActiveUniforms;
|
||||
}
|
||||
|
|
|
@ -196,6 +196,31 @@ void GLFunctions::glFlush()
|
|||
GLCHECK(glFlushFn());
|
||||
}
|
||||
|
||||
void GLFunctions::glEnable(glConst mode)
|
||||
{
|
||||
::glEnable(mode);
|
||||
}
|
||||
|
||||
void GLFunctions::glDisable(glConst mode)
|
||||
{
|
||||
::glDisable(mode);
|
||||
}
|
||||
|
||||
void GLFunctions::glClearDepth(double depth)
|
||||
{
|
||||
::glClearDepth(depth);
|
||||
}
|
||||
|
||||
void GLFunctions::glDepthMask(bool needWriteToDepthBuffer)
|
||||
{
|
||||
::glDepthMask(convert(needWriteToDepthBuffer));
|
||||
}
|
||||
|
||||
void GLFunctions::glDepthFunc(glConst depthFunc)
|
||||
{
|
||||
::glDepthFunc(depthFunc);
|
||||
}
|
||||
|
||||
void GLFunctions::glBindFramebuffer(glConst target, uint32_t id)
|
||||
{
|
||||
ASSERT(glBindFramebufferFn != NULL, ());
|
||||
|
|
|
@ -14,6 +14,12 @@ public:
|
|||
static void glViewport(uint32_t x, uint32_t y, uint32_t w, uint32_t h);
|
||||
static void glFlush();
|
||||
|
||||
static void glEnable(glConst mode);
|
||||
static void glDisable(glConst mode);
|
||||
static void glClearDepth(double depth);
|
||||
static void glDepthMask(bool needWriteToDepthBuffer);
|
||||
static void glDepthFunc(glConst depthFunc);
|
||||
|
||||
static void glBindFramebuffer(glConst target, uint32_t id);
|
||||
|
||||
/// VAO support
|
||||
|
|
Loading…
Add table
Reference in a new issue