Added support for unsigned integer uniforms. Depends on shader language support for the same.

TRAC #22842 Signed-off-by: Geoff Lang Signed-off-by: Shanon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2143 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 44ce5b11
......@@ -551,6 +551,26 @@ bool ProgramBinary::setUniform4iv(GLint location, GLsizei count, const GLint *v)
return setUniform(location, count, v, GL_INT_VEC4);
}
bool ProgramBinary::setUniform1uiv(GLint location, GLsizei count, const GLuint *v)
{
return setUniform(location, count, v, GL_UNSIGNED_INT);
}
bool ProgramBinary::setUniform2uiv(GLint location, GLsizei count, const GLuint *v)
{
return setUniform(location, count, v, GL_UNSIGNED_INT_VEC2);
}
bool ProgramBinary::setUniform3uiv(GLint location, GLsizei count, const GLuint *v)
{
return setUniform(location, count, v, GL_UNSIGNED_INT_VEC3);
}
bool ProgramBinary::setUniform4uiv(GLint location, GLsizei count, const GLuint *v)
{
return setUniform(location, count, v, GL_UNSIGNED_INT_VEC4);
}
bool ProgramBinary::getUniformfv(GLint location, GLsizei *bufSize, GLfloat *params)
{
if (location < 0 || location >= (int)mUniformIndex.size())
......
......@@ -81,13 +81,17 @@ class ProgramBinary : public RefCountObject
bool setUniform2fv(GLint location, GLsizei count, const GLfloat *v);
bool setUniform3fv(GLint location, GLsizei count, const GLfloat *v);
bool setUniform4fv(GLint location, GLsizei count, const GLfloat *v);
bool setUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
bool setUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
bool setUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
bool setUniform1iv(GLint location, GLsizei count, const GLint *v);
bool setUniform2iv(GLint location, GLsizei count, const GLint *v);
bool setUniform3iv(GLint location, GLsizei count, const GLint *v);
bool setUniform4iv(GLint location, GLsizei count, const GLint *v);
bool setUniform1uiv(GLint location, GLsizei count, const GLuint *v);
bool setUniform2uiv(GLint location, GLsizei count, const GLuint *v);
bool setUniform3uiv(GLint location, GLsizei count, const GLuint *v);
bool setUniform4uiv(GLint location, GLsizei count, const GLuint *v);
bool setUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
bool setUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
bool setUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
bool setUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
bool setUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
bool setUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
......
......@@ -8493,9 +8493,18 @@ void __stdcall glUniform1uiv(GLint location, GLsizei count, const GLuint* value)
{
return gl::error(GL_INVALID_OPERATION);
}
}
UNIMPLEMENTED();
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
if (!programBinary)
{
return gl::error(GL_INVALID_OPERATION);
}
if (!programBinary->setUniform1uiv(location, count, value))
{
return gl::error(GL_INVALID_OPERATION);
}
}
}
catch(std::bad_alloc&)
{
......@@ -8518,9 +8527,18 @@ void __stdcall glUniform2uiv(GLint location, GLsizei count, const GLuint* value)
{
return gl::error(GL_INVALID_OPERATION);
}
}
UNIMPLEMENTED();
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
if (!programBinary)
{
return gl::error(GL_INVALID_OPERATION);
}
if (!programBinary->setUniform2uiv(location, count, value))
{
return gl::error(GL_INVALID_OPERATION);
}
}
}
catch(std::bad_alloc&)
{
......@@ -8543,9 +8561,18 @@ void __stdcall glUniform3uiv(GLint location, GLsizei count, const GLuint* value)
{
return gl::error(GL_INVALID_OPERATION);
}
}
UNIMPLEMENTED();
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
if (!programBinary)
{
return gl::error(GL_INVALID_OPERATION);
}
if (!programBinary->setUniform3uiv(location, count, value))
{
return gl::error(GL_INVALID_OPERATION);
}
}
}
catch(std::bad_alloc&)
{
......@@ -8568,9 +8595,18 @@ void __stdcall glUniform4uiv(GLint location, GLsizei count, const GLuint* value)
{
return gl::error(GL_INVALID_OPERATION);
}
}
UNIMPLEMENTED();
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
if (!programBinary)
{
return gl::error(GL_INVALID_OPERATION);
}
if (!programBinary->setUniform4uiv(location, count, value))
{
return gl::error(GL_INVALID_OPERATION);
}
}
}
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