linux followup work by tim

This commit is contained in:
AzaezelX 2019-08-21 03:12:54 -05:00
parent 9fe9389ae5
commit f1282a9cbc
26 changed files with 6646 additions and 5681 deletions

View file

@ -107,6 +107,15 @@ void GFXGLDevice::enterDebugEvent(ColorI color, const char *name)
#ifdef TORQUE_BASIC_GPU_PROFILER
gfxProfiler.enterDebugEvent(color, name);
#endif
if (mCapabilities.khrDebug)
{
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, name);
}
else if(mCapabilities.extDebugMarker)
{
glPushGroupMarkerEXT(0, name);
}
}
void GFXGLDevice::leaveDebugEvent()
@ -114,11 +123,28 @@ void GFXGLDevice::leaveDebugEvent()
#ifdef TORQUE_BASIC_GPU_PROFILER
gfxProfiler.leaveDebugEvent();
#endif
if (mCapabilities.khrDebug)
{
glPopDebugGroup();
}
else if(mCapabilities.extDebugMarker)
{
glPopGroupMarkerEXT();
}
}
void GFXGLDevice::setDebugMarker(ColorI color, const char *name)
{
if (mCapabilities.khrDebug)
{
glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_MARKER, 0,
GL_DEBUG_SEVERITY_NOTIFICATION, -1, name);
}
else if(mCapabilities.extDebugMarker)
{
glInsertEventMarkerEXT(0, name);
}
}
#ifdef TORQUE_BASIC_GPU_PROFILER