From: havoc Date: Tue, 31 Jul 2018 02:05:57 +0000 (+0000) Subject: Fix gl_debug code which was broken as I didn't copy enough of the headers over from... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ed6bfaf840e9b0611186c207d3cb46febdf9255c;p=xonotic%2Fdarkplaces.git Fix gl_debug code which was broken as I didn't copy enough of the headers over from another checkout. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12449 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/glquake.h b/glquake.h index 8b296f1e..3c90e530 100644 --- a/glquake.h +++ b/glquake.h @@ -933,6 +933,37 @@ extern void (GLAPIENTRY *qglPointSize)(GLfloat size); #endif extern void (GLAPIENTRY *qglBlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#ifndef GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB +#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +#define GL_DEBUG_SOURCE_API_ARB 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +#define GL_DEBUG_TYPE_ERROR_ARB 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +typedef void (GLAPIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const GLvoid* userParam); +extern GLuint(GLAPIENTRY *qglGetDebugMessageLogARB)(GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog); +extern void (GLAPIENTRY *qglDebugMessageCallbackARB)(GLDEBUGPROCARB callback, const GLvoid* userParam); +extern void (GLAPIENTRY *qglDebugMessageControlARB)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled); +extern void (GLAPIENTRY *qglDebugMessageInsertARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf); +extern void (GLAPIENTRY *qglGetPointerv)(GLenum pname, GLvoid** params); +#endif + #endif #define DEBUGGL @@ -1136,12 +1167,6 @@ void GL_PrintError(int errornumber, const char *filename, int linenumber); #define qglGetVertexAttribfv glGetVertexAttribfv #define qglGetVertexAttribiv glGetVertexAttribiv #define qglGetVertexAttribPointerv glGetVertexAttribPointerv - -extern GLuint(GLAPIENTRY *qglGetDebugMessageLogARB)(GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog); -extern void (GLAPIENTRY *qglDebugMessageCallbackARB)(GLDEBUGPROCARB callback, const GLvoid* userParam); -extern void (GLAPIENTRY *qglDebugMessageControlARB)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled); -extern void (GLAPIENTRY *qglDebugMessageInsertARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf); -typedef void (GLAPIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const GLvoid* userParam); #endif #endif diff --git a/vid_shared.c b/vid_shared.c index 0a522462..5938a45b 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -239,6 +239,7 @@ void (GLAPIENTRY *qglDrawArrays)(GLenum mode, GLint first, GLsizei count); void (GLAPIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height); +void (GLAPIENTRY *qglGetPointerv)(GLenum pname, GLvoid** params); void (GLAPIENTRY *qglReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); void (GLAPIENTRY *qglStencilFunc)(GLenum func, GLint ref, GLuint mask);