Commit 56a352f3 authored by Robert Menzel's avatar Robert Menzel

added KHR_debug emulator with basic DebugMessageControl

parent 21b3492b
......@@ -14,6 +14,7 @@
#include <ACGL/ACGL.hh>
#include <ACGL/OpenGL/GL.hh>
#include <ACGL/OpenGL/Debug.hh>
namespace ACGL{
namespace OpenGL{
......@@ -222,6 +223,8 @@ inline bool openGLErrorOccuredDummy() { return false; }
# define openGLRareErrorOccured() ACGL::OpenGL::openGLErrorOccuredDummy()
#endif
} // OpenGL
} // ACGL
......
......@@ -67,8 +67,11 @@ void ACGLRegisterDefaultDebugCallback()
//! place a brakepoint in here to find the source of a problem!
void ACGL_KHR_default_debug_callback( GLenum _source, GLenum _type, GLuint _id, GLenum _severity, GLsizei _length, const GLchar *_message, const void *_userParam)
{
debug() << "<" << _id << "> " << debugSeverityName(_severity) << ": " << debugSourceName(_source) << " " << debugTypeName(_type) << " " << _message << endl;
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;
}
// delete all errors to not create another error log for the same problem:
while ( glGetError() != GL_NO_ERROR ) {}
}
......
......@@ -148,7 +148,7 @@ void TextureBase::generateMipmaps(void)
#if (!defined ACGL_OPENGL_PROFILE_CORE)
// on some ATI systems texturing has to be enabled to generate MipMaps
// this is not needed by the spec an deprecated on core profiles (generates
// this is not needed by the spec and deprecated on core profiles (generates
// an error on MacOS X Lion)
glEnable(mTarget);
openGLRareError();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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