Index: source/lib/external_libraries/glext_funcs.h =================================================================== --- source/lib/external_libraries/glext_funcs.h +++ source/lib/external_libraries/glext_funcs.h @@ -125,10 +125,16 @@ typedef GLuint GLhandleARB; +// GL_KHR_debug / GLES3.2 +FUNC2(void, glObjectLabelKHR, glObjectLabel, "3.2", (GLenum identifier, GLuint name, GLsizei length, const GLchar *label)) + #else // were these defined as real functions in gl.h already? +// GL_KHR_debug / GL4.3 +FUNC2(void, glObjectLabelKHR, glObjectLabel, "4.3", (GLenum identifier, GLuint name, GLsizei length, const GLchar *label)) + // GL_EXT_draw_range_elements / GL1.2: FUNC2(void, glDrawRangeElementsEXT, glDrawRangeElements, "1.2", (GLenum, GLuint, GLuint, GLsizei, GLenum, GLvoid*)) Index: source/lib/res/graphics/ogl_tex.cpp =================================================================== --- source/lib/res/graphics/ogl_tex.cpp +++ source/lib/res/graphics/ogl_tex.cpp @@ -484,6 +484,10 @@ if(ot->flags & OT_NEED_AUTO_UPLOAD) (void)ogl_tex_upload(h); + std::string name = pathname.string8(); + glBindTexture(GL_TEXTURE_2D, ot->id); + pglObjectLabelKHR(GL_TEXTURE, ot->id, name.size(), name.c_str()); + return INFO::OK; }