X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fvertexsetup.cpp;h=4b2e2a5f0e5b8d3ccfb1bb435772f58557c15efb;hb=82282de52e8e8f3bbafefaf92bf76f53f2c2495e;hp=f6f0f58b65397cabdba6f9cbdc42bf027503689d;hpb=6d33ca40415937790ed0cddc97148b5fbd90ccaf;p=libs%2Fgl.git diff --git a/source/core/vertexsetup.cpp b/source/core/vertexsetup.cpp index f6f0f58b..4b2e2a5f 100644 --- a/source/core/vertexsetup.cpp +++ b/source/core/vertexsetup.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "buffer.h" #include "error.h" #include "gl.h" @@ -209,5 +210,15 @@ void VertexSetup::unbind() glBindVertexArray(0); } +void VertexSetup::set_debug_name(const string &name) +{ +#ifdef DEBUG + if(KHR_debug) + glObjectLabel(GL_VERTEX_ARRAY, id, name.size(), name.c_str()); +#else + (void)name; +#endif +} + } // namespace GL } // namespace Msp