mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 06:34:10 +00:00
Extended OpenGL Debug Callback
This commit is contained in:
parent
0b18703686
commit
74bfdfef73
2 changed files with 25 additions and 3 deletions
|
@ -131,16 +131,36 @@ For ARB_debug_output
|
|||
*/
|
||||
// RB: added const to userParam
|
||||
static void CALLBACK DebugCallback( unsigned int source, unsigned int type,
|
||||
unsigned int id, unsigned int severity, int length, const char* message, const void* userParam )
|
||||
unsigned int id, unsigned int severity, int length, const char* msg, const void* userParam )
|
||||
{
|
||||
char s[1024];
|
||||
|
||||
// it probably isn't safe to do an idLib::Printf at this point
|
||||
|
||||
const char* severityStr = "Severity: Unkown";
|
||||
switch( severity )
|
||||
{
|
||||
case GL_DEBUG_SEVERITY_HIGH:
|
||||
severityStr = "Severity: High";
|
||||
break;
|
||||
|
||||
case GL_DEBUG_SEVERITY_MEDIUM:
|
||||
severityStr = "Severity: Medium";
|
||||
break;
|
||||
|
||||
case GL_DEBUG_SEVERITY_LOW:
|
||||
severityStr = "Severity: High";
|
||||
break;
|
||||
}
|
||||
|
||||
idStr::snPrintf( s, sizeof( s ), "[OpenGL] Debug: [ %s ] Code %d, %d : '%s'\n", severityStr, source, type, msg );
|
||||
|
||||
// RB: printf should be thread safe on Linux
|
||||
#if defined(_WIN32)
|
||||
OutputDebugString( message );
|
||||
OutputDebugString( s );
|
||||
OutputDebugString( "\n" );
|
||||
#else
|
||||
printf( "%s\n", message );
|
||||
printf( "%s\n", s );
|
||||
#endif
|
||||
// RB end
|
||||
}
|
||||
|
|
|
@ -655,6 +655,8 @@ void idRenderSystemLocal::SwapCommandBuffers_FinishRendering(
|
|||
return;
|
||||
}
|
||||
|
||||
//GL_CheckErrors();
|
||||
|
||||
// After coming back from an autoswap, we won't have anything to render
|
||||
//if( frameData && frameData->cmdHead->next != NULL )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue