mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-11 08:20:45 +00:00
linux followup work by tim
This commit is contained in:
parent
9fe9389ae5
commit
f1282a9cbc
26 changed files with 6646 additions and 5681 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue