If a uniform was created before, still set the register type index since it can be different.

TRAC #20948 Issue=337 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1139 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 28be96b0
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 1129
#define BUILD_REVISION 1139
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -1921,20 +1921,17 @@ bool Program::defineUniform(GLenum shader, const D3DXCONSTANT_DESC &constantDesc
if (location >= 0)
{
delete uniform;
if (mUniforms[mUniformIndex[location].index]->type != type)
{
return false;
}
else
{
return true;
}
uniform = mUniforms[mUniformIndex[location].index];
}
if (shader == GL_FRAGMENT_SHADER) uniform->ps.set(constantDescription);
if (shader == GL_VERTEX_SHADER) uniform->vs.set(constantDescription);
if (location >= 0)
{
return uniform->type == type;
}
mUniforms.push_back(uniform);
unsigned int uniformIndex = mUniforms.size() - 1;
......
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