mirror of https://github.com/axmolengine/axmol.git
format
This commit is contained in:
parent
af8a6c16b1
commit
fad8f9f1da
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue