diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-19 19:56:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-19 21:57:39 +0300 |
commit | 6b1d0fde009bdf8ac1e4b54c6c27254fdec4b58d (patch) | |
tree | 77e4aa775f069e90cdabd6d07db671aa1df5ad41 | |
parent | 17f8465e4358d43accfb0b486b87c18e7dedd83b (diff) | |
download | plus-6b1d0fde009bdf8ac1e4b54c6c27254fdec4b58d.tar.gz plus-6b1d0fde009bdf8ac1e4b54c6c27254fdec4b58d.tar.bz2 plus-6b1d0fde009bdf8ac1e4b54c6c27254fdec4b58d.tar.xz plus-6b1d0fde009bdf8ac1e4b54c6c27254fdec4b58d.zip |
Add some more OpenGL functions from GL_KHR_debug.
-rw-r--r-- | src/graphicsmanager.cpp | 9 | ||||
-rw-r--r-- | src/render/mgl.cpp | 3 | ||||
-rw-r--r-- | src/render/mgl.h | 3 | ||||
-rw-r--r-- | src/render/mgldefines.h | 2 | ||||
-rw-r--r-- | src/render/mgltypes.h | 5 |
5 files changed, 22 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 3609f1e85..1d9914592 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -899,6 +899,9 @@ void GraphicsManager::initOpenGLFunctions() logger->log1("found GL_KHR_debug"); assignFunction(glDebugMessageControl, "glDebugMessageControl"); assignFunction(glDebugMessageCallback, "glDebugMessageCallback"); + assignFunction(glPushDebugGroup, "glPushDebugGroup"); + assignFunction(glPopDebugGroup, "glPopDebugGroup"); + assignFunction(glObjectLabel, "glObjectLabel"); mSupportDebug = 2; } else if (supportExtension("GL_ARB_debug_output")) @@ -1282,6 +1285,12 @@ static CALLBACK void debugCallback(GLenum source, GLenum type, GLuint id, case GL_DEBUG_TYPE_MARKER: message.append(" MARKER"); break; + case GL_DEBUG_TYPE_PUSH_GROUP: + message.append(" PUSH GROUP"); + break; + case GL_DEBUG_TYPE_POP_GROUP: + message.append(" POP GROUP"); + break; default: message.append(" ?").append(toString(type)); break; diff --git a/src/render/mgl.cpp b/src/render/mgl.cpp index 336a5f71b..55bdc1b84 100644 --- a/src/render/mgl.cpp +++ b/src/render/mgl.cpp @@ -97,6 +97,9 @@ defName(glVertexAttribIFormat); defName(glVertexAttribIPointer); defName(glInvalidateTexImage); defName(glCopyImageSubData); +defName(glPushDebugGroup); +defName(glPopDebugGroup); +defName(glObjectLabel); #ifdef WIN32 defName(wglGetExtensionsString); diff --git a/src/render/mgl.h b/src/render/mgl.h index 9cb6ca72f..e3271f71b 100644 --- a/src/render/mgl.h +++ b/src/render/mgl.h @@ -100,6 +100,9 @@ defNameE(glVertexAttribIFormat); defNameE(glVertexAttribIPointer); defNameE(glInvalidateTexImage); defNameE(glCopyImageSubData); +defNameE(glPushDebugGroup); +defNameE(glPopDebugGroup); +defNameE(glObjectLabel); #ifdef WIN32 defNameE(wglGetExtensionsString); diff --git a/src/render/mgldefines.h b/src/render/mgldefines.h index 7a65932eb..524d8eca4 100644 --- a/src/render/mgldefines.h +++ b/src/render/mgldefines.h @@ -55,6 +55,8 @@ #define GL_DEBUG_TYPE_PERFORMANCE 0x8250 #define GL_DEBUG_TYPE_OTHER 0x8251 #define GL_DEBUG_TYPE_MARKER 0x8268 +#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +#define GL_DEBUG_TYPE_POP_GROUP 0x826a #define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B #define GL_DEBUG_SEVERITY_HIGH 0x9146 #define GL_DEBUG_SEVERITY_MEDIUM 0x9147 diff --git a/src/render/mgltypes.h b/src/render/mgltypes.h index 133489d4e..9881ea312 100644 --- a/src/render/mgltypes.h +++ b/src/render/mgltypes.h @@ -151,6 +151,11 @@ typedef void (APIENTRY *glCopyImageSubData_t) (GLuint srcName, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +typedef void (APIENTRY *glPushDebugGroup_t) (GLenum source, GLuint id, + GLsizei length, const GLchar * message); +typedef void (APIENTRY *glPopDebugGroup_t) (void); +typedef void (APIENTRY *glObjectLabel_t) (GLenum identifier, GLuint name, + GLsizei length, const GLchar *label); // callback typedef void (APIENTRY *GLDEBUGPROC_t) (GLenum source, GLenum type, GLuint id, |