FIx review comments

This commit is contained in:
Sam Gateau 2015-04-06 15:40:29 -07:00
parent 4abc760db1
commit 07e7f6ea1d
2 changed files with 6 additions and 4 deletions

View file

@ -363,8 +363,9 @@ void GLBackend::do_glUseProgram(Batch& batch, uint32 paramOffset) {
}
void Batch::_glUniform1f(GLint location, GLfloat v0) {
if (location < 0)
if (location < 0) {
return;
}
ADD_COMMAND_GL(glUniform1f);
_params.push_back(v0);
_params.push_back(location);
@ -372,8 +373,9 @@ void Batch::_glUniform1f(GLint location, GLfloat v0) {
DO_IT_NOW(_glUniform1f, 1);
}
void GLBackend::do_glUniform1f(Batch& batch, uint32 paramOffset) {
if (_pipeline._program == 0)
if (_pipeline._program == 0) {
return;
}
glUniform1f(
batch._params[paramOffset + 1]._int,
batch._params[paramOffset + 0]._float);

View file

@ -477,8 +477,8 @@ private:
bool isTranslucent() const { return isFlag(IS_TRANSLUCENT); }
bool hasLightmap() const { return isFlag(HAS_LIGHTMAP); }
bool hasTangents() const { return isFlag(HAS_TANGENTS); }
bool HasSpecular() const { return isFlag(HAS_SPECULAR); }
bool HasEmissive() const { return isFlag(HAS_EMISSIVE); }
bool hasSpecular() const { return isFlag(HAS_SPECULAR); }
bool hasEmissive() const { return isFlag(HAS_EMISSIVE); }
bool isSkinned() const { return isFlag(IS_SKINNED); }
bool isStereo() const { return isFlag(IS_STEREO); }
bool isDepthOnly() const { return isFlag(IS_DEPTH_ONLY); }