Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opengl error reporting formatting #980

Merged
merged 1 commit into from
Feb 22, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions Engine/source/gfx/gl/gfxGLDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,25 @@ void loadGLExtensions(void *context)
}

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( type == GL_DEBUG_TYPE_OTHER_ARB )
return;
#endif

Con::errorf("OPENGL: %s", message);
if (severity == GL_DEBUG_SEVERITY_HIGH)
Con::errorf("OPENGL: %s", message);
else if (severity == GL_DEBUG_SEVERITY_MEDIUM)
Con::warnf("OPENGL: %s", message);
else if (severity == GL_DEBUG_SEVERITY_LOW)
Con::printf("OPENGL: %s", message);
}

void STDCALL glAmdDebugCallback(GLuint id, GLenum category, GLenum severity, GLsizei length,
const GLchar* message,GLvoid* userParam)
{
Con::errorf("OPENGL: %s",message);
const GLchar* message, GLvoid* userParam)
{
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()
Expand Down