mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
opengl error reporting formatting
This commit is contained in:
parent
98e3651db5
commit
fdbe6ce849
1 changed files with 14 additions and 9 deletions
|
|
@ -82,20 +82,25 @@ void loadGLExtensions(void *context)
|
||||||
}
|
}
|
||||||
|
|
||||||
void STDCALL glDebugCallback(GLenum source, GLenum type, GLuint id,
|
void STDCALL glDebugCallback(GLenum source, GLenum type, GLuint id,
|
||||||
GLenum severity, GLsizei length, const GLchar* message, void* userParam)
|
GLenum severity, GLsizei length, const GLchar* message, void* userParam)
|
||||||
{
|
{
|
||||||
#if defined(TORQUE_DEBUG) && !defined(TORQUE_DEBUG_GFX)
|
if (severity == GL_DEBUG_SEVERITY_HIGH)
|
||||||
if( type == GL_DEBUG_TYPE_OTHER_ARB )
|
Con::errorf("OPENGL: %s", message);
|
||||||
return;
|
else if (severity == GL_DEBUG_SEVERITY_MEDIUM)
|
||||||
#endif
|
Con::warnf("OPENGL: %s", message);
|
||||||
|
else if (severity == GL_DEBUG_SEVERITY_LOW)
|
||||||
Con::errorf("OPENGL: %s", message);
|
Con::printf("OPENGL: %s", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void STDCALL glAmdDebugCallback(GLuint id, GLenum category, GLenum severity, GLsizei length,
|
void STDCALL glAmdDebugCallback(GLuint id, GLenum category, GLenum severity, GLsizei length,
|
||||||
const GLchar* message,GLvoid* userParam)
|
const GLchar* message, GLvoid* userParam)
|
||||||
{
|
{
|
||||||
Con::errorf("OPENGL: %s",message);
|
if (severity == GL_DEBUG_SEVERITY_HIGH)
|
||||||
|
Con::errorf("AMDOPENGL: %s", message);
|
||||||
|
else if (severity == GL_DEBUG_SEVERITY_MEDIUM)
|
||||||
|
Con::warnf("AMDOPENGL: %s", message);
|
||||||
|
else if (severity == GL_DEBUG_SEVERITY_LOW)
|
||||||
|
Con::printf("AMDOPENGL: %s", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXGLDevice::initGLState()
|
void GFXGLDevice::initGLState()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue