Commit a7d05865 by Jamie Madill Committed by Shannon Woods

Add support for new GetAttrib queries for integer and unsigned integer vertex attributes.

TRAC #23391 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang Authored-by: Jamie Madill
parent 30855b37
......@@ -9619,8 +9619,30 @@ void __stdcall glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params)
return gl::error(GL_INVALID_OPERATION);
}
// glGetVertexAttribIiv
UNIMPLEMENTED();
if (index >= gl::MAX_VERTEX_ATTRIBS)
{
return gl::error(GL_INVALID_VALUE);
}
const gl::VertexAttribute &attribState = context->getVertexAttribState(index);
if (!validateGetVertexAttribParameters(pname, context->getClientVersion()))
{
return;
}
if (pname == GL_CURRENT_VERTEX_ATTRIB)
{
const gl::VertexAttribCurrentValueData &currentValueData = context->getVertexAttribCurrentValue(index);
for (int i = 0; i < 4; ++i)
{
params[i] = currentValueData.IntValues[i];
}
}
else
{
*params = attribState.querySingleParameter<GLint>(pname);
}
}
}
catch(std::bad_alloc&)
......@@ -9645,8 +9667,30 @@ void __stdcall glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params)
return gl::error(GL_INVALID_OPERATION);
}
// glGetVertexAttribIuiv
UNIMPLEMENTED();
if (index >= gl::MAX_VERTEX_ATTRIBS)
{
return gl::error(GL_INVALID_VALUE);
}
const gl::VertexAttribute &attribState = context->getVertexAttribState(index);
if (!validateGetVertexAttribParameters(pname, context->getClientVersion()))
{
return;
}
if (pname == GL_CURRENT_VERTEX_ATTRIB)
{
const gl::VertexAttribCurrentValueData &currentValueData = context->getVertexAttribCurrentValue(index);
for (int i = 0; i < 4; ++i)
{
params[i] = currentValueData.UnsignedIntValues[i];
}
}
else
{
*params = attribState.querySingleParameter<GLuint>(pname);
}
}
}
catch(std::bad_alloc&)
......
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