Commit 0c9b6635 authored by Patric Schmitz's avatar Patric Schmitz

add GL version check to glPushDebugGroup/glPopDebugGroup

parent a77d8119
......@@ -7,6 +7,8 @@
#include <glow/common/traits.hh>
#include <glow/gl.hh>
#include <glow/glow.hh>
#include <typed-geometry/types/color.hh>
#include <typed-geometry/types/objects/aabb.hh>
#include <typed-geometry/types/pos.hh>
......@@ -223,9 +225,20 @@ struct debugGroup
{
GLOW_NON_COPYABLE(debugGroup);
debugGroup(std::string const& name, GLuint id = 0) { glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, id, -1, name.c_str()); }
debugGroup(std::string const& name, GLuint id = 0)
{
if (glow::OGLVersion.total >= 43)
{
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, id, -1, name.c_str());
}
}
~debugGroup() { glPopDebugGroup(); }
~debugGroup() {
if (glow::OGLVersion.total >= 43)
{
glPopDebugGroup();
}
}
};
#define GLOW_SCOPED_ENUM_VALUED_GL_FUNC(name, func, getName) \
......
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