X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fsampler.cpp;h=93b3b5c9f702e69e091ffbd480c438d7fe8f695c;hb=fcde8390ad577fe434dcd4b29e0f410d29f867c9;hp=273f2bb712cf96a1acb0ee93f7afb6e0343f86c5;hpb=96bbfddc653826ee9848c468c53bca024711a6c3;p=libs%2Fgl.git diff --git a/source/core/sampler.cpp b/source/core/sampler.cpp index 273f2bb7..93b3b5c9 100644 --- a/source/core/sampler.cpp +++ b/source/core/sampler.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "error.h" #include "sampler.h" @@ -255,6 +256,16 @@ void Sampler::unload() } } +void Sampler::set_debug_name(const string &name) +{ +#ifdef DEBUG + if(id && KHR_debug) + glObjectLabel(GL_SAMPLER, id, name.size(), name.c_str()); +#else + (void)name; +#endif +} + Sampler::Loader::Loader(Sampler &s): DataFile::ObjectLoader(s)