Commit 766a29ba authored by Julius NehringWirxel's avatar Julius NehringWirxel

Now tests for correct opengl version.

parent aa2fdf3b
......@@ -9,6 +9,10 @@ std::string glow::detail::getObjectLabel(GLenum glNamespace, GLuint objectName)
{
checkValidGLOW();
// getObjectLabel requires OpenGL 4.3 or higher
if (glow::OGLVersion.total < 43)
return "";
GLsizei len = 0;
glGetObjectLabel(glNamespace, objectName, 0, &len, nullptr);
......@@ -23,6 +27,10 @@ void glow::detail::setObjectLabel(GLenum glNamespace, GLuint objectName, std::st
{
checkValidGLOW();
// glObjectLabel requires OpenGL 4.3 or higher
if (glow::OGLVersion.total < 43)
return;
if (label.size() > maxLength)
{
auto s = std::string(label.substr(0, maxLength)) + "...";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment