Make assert_glerror not a hotspot.
(transplanted from 8476304a30a3c387a722b33743ef3385e85f85a0)master
parent
919229573c
commit
873ed0febf
|
|
@ -1039,23 +1039,8 @@ void flush_glerror()
|
|||
glGetError();
|
||||
}
|
||||
|
||||
void assert_glerror()
|
||||
void do_assert_glerror()
|
||||
{
|
||||
if (!gGLActive)
|
||||
{
|
||||
//llwarns << "GL used while not active!" << llendl;
|
||||
|
||||
if (gDebugSession)
|
||||
{
|
||||
//ll_fail("GL used while not active");
|
||||
}
|
||||
}
|
||||
|
||||
if (gNoRender || !gDebugGL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gGLManager.mInited)
|
||||
{
|
||||
LL_ERRS("RenderInit") << "GL not initialized" << LL_ENDL;
|
||||
|
|
@ -1107,6 +1092,25 @@ void assert_glerror()
|
|||
}
|
||||
}
|
||||
|
||||
void assert_glerror()
|
||||
{
|
||||
if (!gGLActive)
|
||||
{
|
||||
//llwarns << "GL used while not active!" << llendl;
|
||||
|
||||
if (gDebugSession)
|
||||
{
|
||||
//ll_fail("GL used while not active");
|
||||
}
|
||||
}
|
||||
|
||||
if (!gNoRender && gDebugGL)
|
||||
{
|
||||
do_assert_glerror();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void clear_glerror()
|
||||
{
|
||||
// Create or update texture to be used with this data
|
||||
|
|
|
|||
Loading…
Reference in New Issue