mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Add support for glObjectLabel to aid debugging
This commit is contained in:
@@ -161,10 +161,23 @@ public:
|
||||
GL.BlendEquation(mode);
|
||||
}
|
||||
|
||||
inline void irrGlObjectLabel(GLenum identifier, GLuint name, const char *label)
|
||||
{
|
||||
if (KHRDebugSupported) {
|
||||
u32 len = strlen(label);
|
||||
// Since our texture strings can get quite long we also truncate
|
||||
// to a hardcoded limit of 82
|
||||
len = std::min(len, std::min(MaxLabelLength, 82U));
|
||||
GL.ObjectLabel(identifier, name, len, label);
|
||||
}
|
||||
}
|
||||
|
||||
bool LODBiasSupported = false;
|
||||
bool AnisotropicFilterSupported = false;
|
||||
bool BlendMinMaxSupported = false;
|
||||
bool TextureMultisampleSupported = false;
|
||||
bool KHRDebugSupported = false;
|
||||
u32 MaxLabelLength = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user