X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fvertexsetup.cpp;h=4b2e2a5f0e5b8d3ccfb1bb435772f58557c15efb;hp=f6f0f58b65397cabdba6f9cbdc42bf027503689d;hb=fcde8390ad577fe434dcd4b29e0f410d29f867c9;hpb=7f0e08f04536bf42b8f64e7dff5cc3e18b916c7b 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