Commit 30855b37 by Jamie Madill Committed by Shannon Woods

Support querying if a vertex attribute is an un-normalized integer.

TRAC #23391 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang Authored-by: Jamie Madill
parent aff71508
......@@ -77,6 +77,8 @@ class VertexAttribute
return static_cast<T>(mBoundBuffer.id());
case GL_VERTEX_ATTRIB_ARRAY_DIVISOR:
return static_cast<T>(mDivisor);
case GL_VERTEX_ATTRIB_ARRAY_INTEGER:
return static_cast<T>(mPureInteger ? GL_TRUE : GL_FALSE);
default:
UNREACHABLE();
return static_cast<T>(0);
......
......@@ -1942,6 +1942,9 @@ bool validateGetVertexAttribParameters(GLenum pname, int clientVersion)
META_ASSERT(GL_VERTEX_ATTRIB_ARRAY_DIVISOR == GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE);
return true;
case GL_VERTEX_ATTRIB_ARRAY_INTEGER:
return ((clientVersion >= 3) ? true : gl::error(GL_INVALID_ENUM, false));
default:
return gl::error(GL_INVALID_ENUM, false);
}
......
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