Commit 29d22745 authored by Robert Menzel's avatar Robert Menzel

windows compatibility and fixed opengl version detection

parent 65e63f05
......@@ -182,11 +182,11 @@ DebugGroupDescription g_DebugGroupDescriptions[ KHR_DEBUG_EMULATOR_MAX_DEBUG_GRO
//
GLboolean isValidSeverity( GLenum e );
GLboolean isValidType( GLenum e );
void KHR_DEBUG_EMULATOR_DebugMessageInsert_internal(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf);
void APIENTRY KHR_DEBUG_EMULATOR_DebugMessageInsert_internal(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf);
// returns true if the message should not get ignored by the rules defined by glDebugMessageControl:
GLboolean shouldMessageGetProcessed( GLenum source, GLenum type, GLuint id, GLenum severity );
void KHR_DEBUG_EMULATOR_DebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf)
void APIENTRY KHR_DEBUG_EMULATOR_DebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf)
{
if (KHR_DEBUG_EMULATOR_isEnabled == 0) return;
......@@ -198,7 +198,7 @@ void KHR_DEBUG_EMULATOR_DebugMessageInsert(GLenum source, GLenum type, GLuint id
KHR_DEBUG_EMULATOR_DebugMessageInsert_internal( source, type, id, severity, length, buf );
}
void KHR_DEBUG_EMULATOR_DebugMessageInsert_internal(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf)
void APIENTRY KHR_DEBUG_EMULATOR_DebugMessageInsert_internal(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf)
{
if (KHR_DEBUG_EMULATOR_isEnabled == 0) return;
......@@ -246,7 +246,7 @@ void KHR_DEBUG_EMULATOR_DebugMessageInsert_internal(GLenum source, GLenum type,
/////////////////////////////
GLboolean debugContextIsSimulated();
void KHR_DEBUG_EMULATOR_DebugMessageCallback(GLDEBUGPROC callback, const void * userParam)
void APIENTRY KHR_DEBUG_EMULATOR_DebugMessageCallback(GLDEBUGPROC callback, const void * userParam)
{
KHR_DEBUG_EMULATOR_callback = callback;
KHR_DEBUG_EMULATOR_userParam = userParam;
......@@ -269,7 +269,7 @@ GLboolean shouldMessageGetProcessed( GLenum source, GLenum type, GLuint id, GLen
// adds a new rule:
void addRule( DebugMessageControlRule *newRule );
void KHR_DEBUG_EMULATOR_DebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled)
void APIENTRY KHR_DEBUG_EMULATOR_DebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled)
{
DebugMessageControlRule *rule = (DebugMessageControlRule*) malloc( sizeof(DebugMessageControlRule) );
rule->source = source;
......@@ -303,7 +303,7 @@ void KHR_DEBUG_EMULATOR_DebugMessageControl(GLenum source, GLenum type, GLenum s
/////////////////////////////
/// glGetDebugMessageLog
/////////////////////////////
GLuint KHR_DEBUG_EMULATOR_GetDebugMessageLog(GLuint count, GLsizei bufsize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog)
GLuint APIENTRY KHR_DEBUG_EMULATOR_GetDebugMessageLog(GLuint count, GLsizei bufsize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog)
{
if (bufsize < 0 && messageLog != NULL) {
INSERT_API_ERROR( GL_INVALID_VALUE , "invalid value in glGetDebugMessageLog: bufsize < 0 and messageLog != NULL" );
......@@ -350,7 +350,7 @@ void insertObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLc
//
// TODO: check if name is a valid object, emit an INVALID_VALUE otherwise
//
void KHR_DEBUG_EMULATOR_ObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar * label)
void APIENTRY KHR_DEBUG_EMULATOR_ObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar * label)
{
if ( !isValidObjectLabelNamespace(identifier) ) {
INSERT_API_ERROR( GL_INVALID_ENUM, "invalid enum in glObjectLabel" );
......@@ -400,7 +400,7 @@ void KHR_DEBUG_EMULATOR_ObjectLabel(GLenum identifier, GLuint name, GLsizei leng
/////////////////////////////
/// glGetObjectLabel
/////////////////////////////
void KHR_DEBUG_EMULATOR_GetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label)
void APIENTRY KHR_DEBUG_EMULATOR_GetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label)
{
if ( !isValidObjectLabelNamespace(identifier) ) {
INSERT_API_ERROR( GL_INVALID_ENUM, "invalid enum in glObjectGetLabel" );
......@@ -438,7 +438,7 @@ void KHR_DEBUG_EMULATOR_GetObjectLabel(GLenum identifier, GLuint name, GLsizei b
ObjectPtrLabel *findObjectPtrLabel(const void * ptr);
void insertObjectPtrLabel(const void * ptr, GLsizei length, const GLchar * label);
void KHR_DEBUG_EMULATOR_ObjectPtrLabel(const void * ptr, GLsizei length, const GLchar * label)
void APIENTRY KHR_DEBUG_EMULATOR_ObjectPtrLabel(const void * ptr, GLsizei length, const GLchar * label)
{
if (length < 0) {
length = strlen( label );
......@@ -483,7 +483,7 @@ void KHR_DEBUG_EMULATOR_ObjectPtrLabel(const void * ptr, GLsizei length, const G
/////////////////////////////
/// glGetObjectPtrLabel
/////////////////////////////
void KHR_DEBUG_EMULATOR_GetObjectPtrLabel(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label)
void APIENTRY KHR_DEBUG_EMULATOR_GetObjectPtrLabel(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label)
{
ObjectPtrLabel *thelabel = findObjectPtrLabel( ptr );
if (thelabel == NULL) {
......@@ -512,7 +512,7 @@ void KHR_DEBUG_EMULATOR_GetObjectPtrLabel(const void * ptr, GLsizei bufSize, GLs
/////////////////////////////
/// glPopDebugGroup
/////////////////////////////
void KHR_DEBUG_EMULATOR_PopDebugGroup()
void APIENTRY KHR_DEBUG_EMULATOR_PopDebugGroup()
{
if (g_DebugGroupNumber == 0) {
INSERT_API_ERROR( GL_STACK_UNDERFLOW, "stack underflow in glPushDebugGroup: can't pop default group" );
......@@ -554,7 +554,7 @@ void KHR_DEBUG_EMULATOR_PopDebugGroup()
/////////////////////////////
/// glPushDebugGroup
/////////////////////////////
void KHR_DEBUG_EMULATOR_PushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar * message)
void APIENTRY KHR_DEBUG_EMULATOR_PushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar * message)
{
if ((source != GL_DEBUG_SOURCE_APPLICATION) && (source != GL_DEBUG_SOURCE_THIRD_PARTY)) {
INSERT_API_ERROR( GL_INVALID_ENUM, "invalid enum in glPushDebugGroup: source has to be GL_DEBUG_SOURCE_APPLICATION or GL_DEBUG_SOURCE_THIRD_PARTY" );
......@@ -592,7 +592,7 @@ void KHR_DEBUG_EMULATOR_PushDebugGroup(GLenum source, GLuint id, GLsizei length,
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
void KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
void APIENTRY KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
//
// glGetError
......@@ -613,7 +613,7 @@ GLenum KHR_DEBUG_EMULATOR_GetError() {
// glDisable | glEnable | glIsEnabled
// need to recognize GL_DEBUG_OUTPUT & GL_DEBUG_OUTPUT_SYNCHRONOUS
//
void KHR_DEBUG_EMULATOR_Disable(GLenum cap){
void APIENTRY KHR_DEBUG_EMULATOR_Disable(GLenum cap){
if (cap == GL_DEBUG_OUTPUT) {
KHR_DEBUG_EMULATOR_isEnabled = 0;
return;
......@@ -626,7 +626,7 @@ void KHR_DEBUG_EMULATOR_Disable(GLenum cap){
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
void KHR_DEBUG_EMULATOR_Enable(GLenum cap){
void APIENTRY KHR_DEBUG_EMULATOR_Enable(GLenum cap){
if (cap == GL_DEBUG_OUTPUT) {
KHR_DEBUG_EMULATOR_isEnabled = 1;
return;
......@@ -640,7 +640,7 @@ void KHR_DEBUG_EMULATOR_Enable(GLenum cap){
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
GLboolean KHR_DEBUG_EMULATOR_IsEnabled(GLenum cap){
GLboolean APIENTRY KHR_DEBUG_EMULATOR_IsEnabled(GLenum cap){
if (cap == GL_DEBUG_OUTPUT) {
return (KHR_DEBUG_EMULATOR_isEnabled == 1);
}
......@@ -657,7 +657,7 @@ GLboolean KHR_DEBUG_EMULATOR_IsEnabled(GLenum cap){
// glGetIntegerv
// needs to recognize a few new tokens
//
void KHR_DEBUG_EMULATOR_GetIntegerv(GLenum pname, GLint * params){
void APIENTRY KHR_DEBUG_EMULATOR_GetIntegerv(GLenum pname, GLint * params){
if (pname == GL_CONTEXT_FLAGS) {
_original_glGetIntegerv(pname, params);
......@@ -689,7 +689,7 @@ void KHR_DEBUG_EMULATOR_GetIntegerv(GLenum pname, GLint * params){
// glGetPointerv
// needs to recognize GL_DEBUG_CALLBACK_FUNCTION & GL_DEBUG_CALLBACK_USER_PARAM
//
void KHR_DEBUG_EMULATOR_GetPointerv( GLenum pname, GLvoid ** params ){
void APIENTRY KHR_DEBUG_EMULATOR_GetPointerv( GLenum pname, GLvoid ** params ){
if (pname == GL_DEBUG_CALLBACK_FUNCTION) {
*params = (GLvoid*) KHR_DEBUG_EMULATOR_callback;
......@@ -707,7 +707,7 @@ void KHR_DEBUG_EMULATOR_GetPointerv( GLenum pname, GLvoid ** params ){
///
///////////////////////////////////////////////////////////////////////////////////////////////////
const char* KHR_DEBUG_EMULATOR_GET_ERROR_STRING( GLenum _errorCode )
const char* APIENTRY KHR_DEBUG_EMULATOR_GET_ERROR_STRING( GLenum _errorCode )
{
if (_errorCode == GL_INVALID_ENUM) { return (char*) "OpenGL error: GL_INVALID_ENUM"; }
else if (_errorCode == GL_INVALID_VALUE) { return (char*) "OpenGL error: GL_INVALID_VALUE"; }
......@@ -724,7 +724,7 @@ const char* KHR_DEBUG_EMULATOR_GET_ERROR_STRING( GLenum _errorCode )
// internal error check that gets triggered after every GL call
// * check for errors, if there was one, trigger a debug message but store the error code to fake the original glGetError behavior
void KHR_DEBUG_EMULATOR_CHECK_GL_ERROR() {
void APIENTRY KHR_DEBUG_EMULATOR_CHECK_GL_ERROR() {
//printf("check error\n");
GLenum currentError = _original_glGetError();
if ( currentError != GL_NO_ERROR ) {
......
......@@ -2466,45 +2466,45 @@ static int Load_KHR_debug()
void KHR_DEBUG_EMULATOR_DebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf);
void APIENTRY KHR_DEBUG_EMULATOR_DebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf);
void KHR_DEBUG_EMULATOR_DebugMessageCallback(GLDEBUGPROC callback, const void * userParam);
void APIENTRY KHR_DEBUG_EMULATOR_DebugMessageCallback(GLDEBUGPROC callback, const void * userParam);
void KHR_DEBUG_EMULATOR_DebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled);
void APIENTRY KHR_DEBUG_EMULATOR_DebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled);
GLuint KHR_DEBUG_EMULATOR_GetDebugMessageLog(GLuint count, GLsizei bufsize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog);
GLuint APIENTRY KHR_DEBUG_EMULATOR_GetDebugMessageLog(GLuint count, GLsizei bufsize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog);
void KHR_DEBUG_EMULATOR_GetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label);
void APIENTRY KHR_DEBUG_EMULATOR_GetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label);
void KHR_DEBUG_EMULATOR_GetObjectPtrLabel(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label);
void APIENTRY KHR_DEBUG_EMULATOR_GetObjectPtrLabel(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label);
void KHR_DEBUG_EMULATOR_ObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar * label);
void APIENTRY KHR_DEBUG_EMULATOR_ObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar * label);
void KHR_DEBUG_EMULATOR_ObjectPtrLabel(const void * ptr, GLsizei length, const GLchar * label);
void APIENTRY KHR_DEBUG_EMULATOR_ObjectPtrLabel(const void * ptr, GLsizei length, const GLchar * label);
void KHR_DEBUG_EMULATOR_PopDebugGroup();
void APIENTRY KHR_DEBUG_EMULATOR_PopDebugGroup();
void KHR_DEBUG_EMULATOR_PushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar * message);
void APIENTRY KHR_DEBUG_EMULATOR_PushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar * message);
// internal error check that gets triggered after every GL call
void KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
void APIENTRY KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
GLenum KHR_DEBUG_EMULATOR_GetError();
GLenum APIENTRY KHR_DEBUG_EMULATOR_GetError();
void KHR_DEBUG_EMULATOR_Disable(GLenum cap);
void APIENTRY KHR_DEBUG_EMULATOR_Disable(GLenum cap);
void KHR_DEBUG_EMULATOR_Enable(GLenum cap);
void APIENTRY KHR_DEBUG_EMULATOR_Enable(GLenum cap);
GLboolean KHR_DEBUG_EMULATOR_IsEnabled(GLenum cap);
GLboolean APIENTRY KHR_DEBUG_EMULATOR_IsEnabled(GLenum cap);
void KHR_DEBUG_EMULATOR_GetIntegerv(GLenum pname, GLint * params);
void APIENTRY KHR_DEBUG_EMULATOR_GetIntegerv(GLenum pname, GLint * params);
void KHR_DEBUG_EMULATOR_GetPointerv( GLenum pname, GLvoid ** params );
void APIENTRY KHR_DEBUG_EMULATOR_GetPointerv( GLenum pname, GLvoid ** params );
// Extension: EXT_geometry_shader4
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glProgramParameteriEXT)(GLuint, GLenum, GLint)
void wrapperglProgramParameteriEXT(GLuint program, GLenum pname, GLint value){
void APIENTRY wrapperglProgramParameteriEXT(GLuint program, GLenum pname, GLint value){
_original_glProgramParameteriEXT(program, pname, value);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
......@@ -2513,28 +2513,28 @@ void wrapperglProgramParameteriEXT(GLuint program, GLenum pname, GLint value){
// Extension: ARB_geometry_shader4
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glFramebufferTextureARB)(GLenum, GLenum, GLuint, GLint)
void wrapperglFramebufferTextureARB(GLenum target, GLenum attachment, GLuint texture, GLint level){
void APIENTRY wrapperglFramebufferTextureARB(GLenum target, GLenum attachment, GLuint texture, GLint level){
_original_glFramebufferTextureARB(target, attachment, texture, level);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glFramebufferTextureFaceARB)(GLenum, GLenum, GLuint, GLint, GLenum)
void wrapperglFramebufferTextureFaceARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face){
void APIENTRY wrapperglFramebufferTextureFaceARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face){
_original_glFramebufferTextureFaceARB(target, attachment, texture, level, face);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glFramebufferTextureLayerARB)(GLenum, GLenum, GLuint, GLint, GLint)
void wrapperglFramebufferTextureLayerARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer){
void APIENTRY wrapperglFramebufferTextureLayerARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer){
_original_glFramebufferTextureLayerARB(target, attachment, texture, level, layer);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glProgramParameteriARB)(GLuint, GLenum, GLint)
void wrapperglProgramParameteriARB(GLuint program, GLenum pname, GLint value){
void APIENTRY wrapperglProgramParameteriARB(GLuint program, GLenum pname, GLint value){
_original_glProgramParameteriARB(program, pname, value);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
......@@ -2543,14 +2543,14 @@ void wrapperglProgramParameteriARB(GLuint program, GLenum pname, GLint value){
// Extension: ARB_tessellation_shader
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glPatchParameterfv)(GLenum, const GLfloat *)
void wrapperglPatchParameterfv(GLenum pname, const GLfloat * values){
void APIENTRY wrapperglPatchParameterfv(GLenum pname, const GLfloat * values){
_original_glPatchParameterfv(pname, values);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glPatchParameteri)(GLenum, GLint)
void wrapperglPatchParameteri(GLenum pname, GLint value){
void APIENTRY wrapperglPatchParameteri(GLenum pname, GLint value){
_original_glPatchParameteri(pname, value);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
......@@ -2559,14 +2559,14 @@ void wrapperglPatchParameteri(GLenum pname, GLint value){
// Extension: ARB_compute_shader
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glDispatchCompute)(GLuint, GLuint, GLuint)
void wrapperglDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z){
void APIENTRY wrapperglDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z){
_original_glDispatchCompute(num_groups_x, num_groups_y, num_groups_z);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glDispatchComputeIndirect)(GLintptr)
void wrapperglDispatchComputeIndirect(GLintptr indirect){
void APIENTRY wrapperglDispatchComputeIndirect(GLintptr indirect){
_original_glDispatchComputeIndirect(indirect);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
......@@ -2575,28 +2575,28 @@ void wrapperglDispatchComputeIndirect(GLintptr indirect){
// Extension: ARB_debug_output
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glDebugMessageCallbackARB)(GLDEBUGPROCARB, const void *)
void wrapperglDebugMessageCallbackARB(GLDEBUGPROCARB callback, const void * userParam){
void APIENTRY wrapperglDebugMessageCallbackARB(GLDEBUGPROCARB callback, const void * userParam){
_original_glDebugMessageCallbackARB(callback, userParam);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glDebugMessageControlARB)(GLenum, GLenum, GLenum, GLsizei, const GLuint *, GLboolean)
void wrapperglDebugMessageControlARB(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled){
void APIENTRY wrapperglDebugMessageControlARB(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled){
_original_glDebugMessageControlARB(source, type, severity, count, ids, enabled);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glDebugMessageInsertARB)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar *)
void wrapperglDebugMessageInsertARB(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf){
void APIENTRY wrapperglDebugMessageInsertARB(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf){
_original_glDebugMessageInsertARB(source, type, id, severity, length, buf);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR GLuint (CODEGEN_FUNCPTR *_ptrc_glGetDebugMessageLogARB)(GLuint, GLsizei, GLenum *, GLenum *, GLuint *, GLenum *, GLsizei *, GLchar *)
GLuint wrapperglGetDebugMessageLogARB(GLuint count, GLsizei bufsize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog){
GLuint APIENTRY wrapperglGetDebugMessageLogARB(GLuint count, GLsizei bufsize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog){
GLuint returnValue = _original_glGetDebugMessageLogARB(count, bufsize, sources, types, ids, severities, lengths, messageLog);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
return returnValue;
......@@ -2606,28 +2606,28 @@ GLuint wrapperglGetDebugMessageLogARB(GLuint count, GLsizei bufsize, GLenum * so
// Extension: KHR_debug
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glDebugMessageCallback)(GLDEBUGPROC, const void *)
void wrapperglDebugMessageCallback(GLDEBUGPROC callback, const void * userParam){
void APIENTRY wrapperglDebugMessageCallback(GLDEBUGPROC callback, const void * userParam){
_original_glDebugMessageCallback(callback, userParam);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glDebugMessageControl)(GLenum, GLenum, GLenum, GLsizei, const GLuint *, GLboolean)
void wrapperglDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled){
void APIENTRY wrapperglDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled){
_original_glDebugMessageControl(source, type, severity, count, ids, enabled);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glDebugMessageInsert)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar *)
void wrapperglDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf){
void APIENTRY wrapperglDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf){
_original_glDebugMessageInsert(source, type, id, severity, length, buf);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR GLuint (CODEGEN_FUNCPTR *_ptrc_glGetDebugMessageLog)(GLuint, GLsizei, GLenum *, GLenum *, GLuint *, GLenum *, GLsizei *, GLchar *)
GLuint wrapperglGetDebugMessageLog(GLuint count, GLsizei bufsize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog){
GLuint APIENTRY wrapperglGetDebugMessageLog(GLuint count, GLsizei bufsize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog){
GLuint returnValue = _original_glGetDebugMessageLog(count, bufsize, sources, types, ids, severities, lengths, messageLog);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
return returnValue;
......@@ -2635,49 +2635,49 @@ GLuint wrapperglGetDebugMessageLog(GLuint count, GLsizei bufsize, GLenum * sourc
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glGetObjectLabel)(GLenum, GLuint, GLsizei, GLsizei *, GLchar *)
void wrapperglGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label){
void APIENTRY wrapperglGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label){
_original_glGetObjectLabel(identifier, name, bufSize, length, label);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glGetObjectPtrLabel)(const void *, GLsizei, GLsizei *, GLchar *)
void wrapperglGetObjectPtrLabel(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label){
void APIENTRY wrapperglGetObjectPtrLabel(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label){
_original_glGetObjectPtrLabel(ptr, bufSize, length, label);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glGetPointerv)(GLenum, GLvoid **)
void wrapperglGetPointerv(GLenum pname, GLvoid ** params){
void APIENTRY wrapperglGetPointerv(GLenum pname, GLvoid ** params){
_original_glGetPointerv(pname, params);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glObjectLabel)(GLenum, GLuint, GLsizei, const GLchar *)
void wrapperglObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar * label){
void APIENTRY wrapperglObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar * label){
_original_glObjectLabel(identifier, name, length, label);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glObjectPtrLabel)(const void *, GLsizei, const GLchar *)
void wrapperglObjectPtrLabel(const void * ptr, GLsizei length, const GLchar * label){
void APIENTRY wrapperglObjectPtrLabel(const void * ptr, GLsizei length, const GLchar * label){
_original_glObjectPtrLabel(ptr, length, label);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glPopDebugGroup)()
void wrapperglPopDebugGroup(){
void APIENTRY wrapperglPopDebugGroup(){
_original_glPopDebugGroup();
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glPushDebugGroup)(GLenum, GLuint, GLsizei, const GLchar *)
void wrapperglPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar * message){
void APIENTRY wrapperglPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar * message){
_original_glPushDebugGroup(source, id, length, message);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
......@@ -2686,588 +2686,588 @@ void wrapperglPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLc
// Extension: 1.0
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glAccum)(GLenum, GLfloat)
void wrapperglAccum(GLenum op, GLfloat value){
void APIENTRY wrapperglAccum(GLenum op, GLfloat value){
_original_glAccum(op, value);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glAlphaFunc)(GLenum, GLfloat)
void wrapperglAlphaFunc(GLenum func, GLfloat ref){
void APIENTRY wrapperglAlphaFunc(GLenum func, GLfloat ref){
_original_glAlphaFunc(func, ref);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glBegin)(GLenum)
void wrapperglBegin(GLenum mode){
void APIENTRY wrapperglBegin(GLenum mode){
_original_glBegin(mode);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glBitmap)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *)
void wrapperglBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap){
void APIENTRY wrapperglBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap){
_original_glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glBlendFunc)(GLenum, GLenum)
void wrapperglBlendFunc(GLenum sfactor, GLenum dfactor){
void APIENTRY wrapperglBlendFunc(GLenum sfactor, GLenum dfactor){
_original_glBlendFunc(sfactor, dfactor);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glCallList)(GLuint)
void wrapperglCallList(GLuint list){
void APIENTRY wrapperglCallList(GLuint list){
_original_glCallList(list);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glCallLists)(GLsizei, GLenum, const GLvoid *)
void wrapperglCallLists(GLsizei n, GLenum type, const GLvoid * lists){
void APIENTRY wrapperglCallLists(GLsizei n, GLenum type, const GLvoid * lists){
_original_glCallLists(n, type, lists);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glClear)(GLbitfield)
void wrapperglClear(GLbitfield mask){
void APIENTRY wrapperglClear(GLbitfield mask){
_original_glClear(mask);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glClearAccum)(GLfloat, GLfloat, GLfloat, GLfloat)
void wrapperglClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha){
void APIENTRY wrapperglClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha){
_original_glClearAccum(red, green, blue, alpha);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat)
void wrapperglClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha){
void APIENTRY wrapperglClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha){
_original_glClearColor(red, green, blue, alpha);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glClearDepth)(GLdouble)
void wrapperglClearDepth(GLdouble depth){
void APIENTRY wrapperglClearDepth(GLdouble depth){
_original_glClearDepth(depth);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glClearIndex)(GLfloat)
void wrapperglClearIndex(GLfloat c){
void APIENTRY wrapperglClearIndex(GLfloat c){
_original_glClearIndex(c);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glClearStencil)(GLint)
void wrapperglClearStencil(GLint s){
void APIENTRY wrapperglClearStencil(GLint s){
_original_glClearStencil(s);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glClipPlane)(GLenum, const GLdouble *)
void wrapperglClipPlane(GLenum plane, const GLdouble * equation){
void APIENTRY wrapperglClipPlane(GLenum plane, const GLdouble * equation){
_original_glClipPlane(plane, equation);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glColor3b)(GLbyte, GLbyte, GLbyte)
void wrapperglColor3b(GLbyte red, GLbyte green, GLbyte blue){
void APIENTRY wrapperglColor3b(GLbyte red, GLbyte green, GLbyte blue){
_original_glColor3b(red, green, blue);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glColor3bv)(const GLbyte *)
void wrapperglColor3bv(const GLbyte * v){
void APIENTRY wrapperglColor3bv(const GLbyte * v){
_original_glColor3bv(v);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glColor3d)(GLdouble, GLdouble, GLdouble)
void wrapperglColor3d(GLdouble red, GLdouble green, GLdouble blue){
void APIENTRY wrapperglColor3d(GLdouble red, GLdouble green, GLdouble blue){
_original_glColor3d(red, green, blue);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glColor3dv)(const GLdouble *)
void wrapperglColor3dv(const GLdouble * v){
void APIENTRY wrapperglColor3dv(const GLdouble * v){
_original_glColor3dv(v);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glColor3f)(GLfloat, GLfloat, GLfloat)
void wrapperglColor3f(GLfloat red, GLfloat green, GLfloat blue){
void APIENTRY wrapperglColor3f(GLfloat red, GLfloat green, GLfloat blue){
_original_glColor3f(red, green, blue);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glColor3fv)(const GLfloat *)
void wrapperglColor3fv(const GLfloat * v){
void APIENTRY wrapperglColor3fv(const GLfloat * v){
_original_glColor3fv(v);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glColor3i)(GLint, GLint, GLint)
void wrapperglColor3i(GLint red, GLint green, GLint blue){
void APIENTRY wrapperglColor3i(GLint red, GLint green, GLint blue){
_original_glColor3i(red, green, blue);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glColor3iv)(const GLint *)
void wrapperglColor3iv(const GLint * v){
void APIENTRY wrapperglColor3iv(const GLint * v){
_original_glColor3iv(v);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}
// WRAPPER FOR void (CODEGEN_FUNCPTR *_ptrc_glColor3s)(GLshort, GLshort, GLshort)
void wrapperglColor3s(GLshort red, GLshort green, GLshort blue){
void APIENTRY wrapperglColor3s(GLshort red, GLshort green, GLshort blue){
_original_glColor3s(red, green, blue);
KHR_DEBUG_EMULATOR_CHECK_GL_ERROR();
}