This commit is contained in:
yangxiao 2015-01-27 16:31:15 +08:00
parent af8a6c16b1
commit fad8f9f1da
1 changed files with 4 additions and 2 deletions

View File

@ -675,11 +675,13 @@ bool GLProgram::updateUniformLocation(GLint location, const GLvoid* data, unsign
}
else
{
if (element->second.second < bytes){
if (element->second.second < bytes)
{
GLvoid* value = realloc(element->second.first, bytes);
memcpy(value, data, bytes );
_hashForUniforms[location] = std::make_pair(value, bytes);
}else
}
else
memcpy(element->second.first, data, bytes);
}
}