From 89106a96cd86042415d19f307a4ade5f1fae8b5d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 23 Oct 2012 00:41:25 +0300 Subject: Add OpenGL debug extensions bindings. Also show in log information about known extensions. --- src/mgl.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/mgl.h') diff --git a/src/mgl.h b/src/mgl.h index 5050c5dea..f8d2d8db9 100644 --- a/src/mgl.h +++ b/src/mgl.h @@ -67,13 +67,21 @@ typedef void (APIENTRY *glFramebufferRenderbuffer_t)(GLenum target, typedef void (APIENTRY *glDeleteFramebuffers_t) (GLsizei, const GLuint *); typedef void (APIENTRY *glDeleteRenderbuffers_t) (GLsizei, const GLuint *); typedef const GLubyte *(APIENTRY *glGetStringi_t) (GLenum, GLuint); - typedef void (APIENTRY *glGenSamplers_t) (GLsizei count, GLuint *samplers); typedef void (APIENTRY *glDeleteSamplers_t) (GLsizei count, const GLuint * samplers); typedef void (APIENTRY *glBindSampler_t) (GLuint unit, GLuint sampler); typedef void (APIENTRY *glSamplerParameteri_t) (GLuint sampler, GLenum pname, GLint param); +typedef void (APIENTRY *glDebugMessageControl_t) (GLenum source, GLenum type, + GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled); + +// callback +typedef void (APIENTRY *GLDEBUGPROC_t) (GLenum source, GLenum type, GLuint id, + GLenum severity, GLsizei length, const GLchar *message, GLvoid *userParam); + +typedef void (APIENTRY *glDebugMessageCallback_t) (GLDEBUGPROC_t callback, + const void *userParam); defNameE(glGenRenderbuffers); defNameE(glBindRenderbuffer); @@ -89,6 +97,8 @@ defNameE(glGenSamplers); defNameE(glDeleteSamplers); defNameE(glBindSampler); defNameE(glSamplerParameteri); +defNameE(glDebugMessageControl); +defNameE(glDebugMessageCallback); #ifdef WIN32 typedef const char* (APIENTRY * wglGetExtensionsString_t) (HDC hdc); -- cgit v1.2.3-70-g09d2