Commit 32d9b53a authored by Robert Menzel's avatar Robert Menzel

reverted to 'worse formatting' so we have a place to put out brakepoint again...

parent e0f431e5
......@@ -65,11 +65,18 @@ void ACGLRegisterDefaultDebugCallback()
}
//! place a brakepoint in here to find the source of a problem!
void APIENTRY ACGL_KHR_default_debug_callback( GLenum _source, GLenum _type, GLuint _id, GLenum _severity, GLsizei _length, const GLchar *_message, const void *_userParam)
void APIENTRY ACGL_KHR_default_debug_callback( GLenum _source, GLenum _type, GLuint _id, GLenum _severity, GLsizei /*_length*/, const GLchar *_message, const void* /* _userParam*/ )
{
ostream& stream = (_type == GL_DEBUG_TYPE_ERROR) ? static_cast<ostream&>(error()) : static_cast<ostream&>(debug());
// yes, this could be implemented with less dublicated code, but the
// point here is to have one code path which gets only called in case of an error
// so we have a convenient place to put out brakepoint and haing the error message to
// be printed first...
if (_type == GL_DEBUG_TYPE_ERROR) {
error() << "<" << _id << "> severity: " << debugSeverityName(_severity) << " source: " << debugSourceName(_source) << ": " << _message << endl;
} else {
debug() << "<" << _id << "> severity: " << debugSeverityName(_severity) << " source: " << debugSourceName(_source) << ": " << _message << endl;
}
stream << debugSourceName(_source) << " " << debugTypeName(_type) << ": " << _message << " (id: " << _id << ", severity: " << debugSeverityName(_severity) << ")" << endl;
// delete all errors to not create another error log for the same problem:
while ( glGetError() != GL_NO_ERROR ) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment