- changed GLDebug to receive char pointers instead of FStrings.

The most frequent call using this is the regular texture creation function where this results in a pointless allocation and destruction of a temporary string which is easily avoided.
This commit is contained in:
Christoph Oelckers 2018-04-14 10:40:11 +02:00
commit e654a99d39
7 changed files with 27 additions and 25 deletions

View file

@ -101,19 +101,19 @@ void FGLDebug::Update()
//
//-----------------------------------------------------------------------------
void FGLDebug::LabelObject(GLenum type, GLuint handle, const FString &name)
void FGLDebug::LabelObject(GLenum type, GLuint handle, const char *name)
{
if (HasDebugApi() && gl_debug_level != 0)
{
glObjectLabel(type, handle, (GLsizei)name.Len(), name.GetChars());
glObjectLabel(type, handle, -1, name);
}
}
void FGLDebug::LabelObjectPtr(void *ptr, const FString &name)
void FGLDebug::LabelObjectPtr(void *ptr, const char *name)
{
if (HasDebugApi() && gl_debug_level != 0)
{
glObjectPtrLabel(ptr, (GLsizei)name.Len(), name.GetChars());
glObjectPtrLabel(ptr, -1, name);
}
}