- 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:
parent
ad021cc374
commit
e654a99d39
7 changed files with 27 additions and 25 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue