Commit 59dca946 by Nicolas Capens

Implement GL_CURRENT_COLOR/NORMAL/TEXTURE_COORDS for glGetFloatv().

Bug b/31913614 Bug b/32087196 Change-Id: I45c06c7cb907ae1f1efc57c6302044334159c828 Reviewed-on: https://swiftshader-review.googlesource.com/7734Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 81c28576
...@@ -1175,6 +1175,24 @@ bool Context::getFloatv(GLenum pname, GLfloat *params) ...@@ -1175,6 +1175,24 @@ bool Context::getFloatv(GLenum pname, GLfloat *params)
params[i] = projectionStack.current()[i % 4][i / 4]; params[i] = projectionStack.current()[i % 4][i / 4];
} }
break; break;
case GL_CURRENT_COLOR:
for(int i = 0; i < 4; i++)
{
params[i] = mState.vertexAttribute[sw::Color0].mCurrentValue[i];
}
break;
case GL_CURRENT_NORMAL:
for(int i = 0; i < 3; i++)
{
params[i] = mState.vertexAttribute[sw::Normal].mCurrentValue[i];
}
break;
case GL_CURRENT_TEXTURE_COORDS:
for(int i = 0; i < 4; i++)
{
params[i] = mState.vertexAttribute[sw::TexCoord0].mCurrentValue[i];
}
break;
default: default:
return false; return 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