GRIM, SHADERS: Drop no-op calls in GfxOpenGLS::drawMesh.

disableLight/enableLight only set _lightsEnabled, and nothing reads it
between these two calls.
This commit is contained in:
Vincent Pelletier 2016-07-10 01:04:25 +00:00
parent 7108b8cbe9
commit c57691c751

View file

@ -980,8 +980,6 @@ void GfxOpenGLS::drawMesh(const Mesh *mesh) {
const Material *curMaterial = NULL;
for (int i = 0; i < mesh->_numFaces;) {
const MeshFace *face = &mesh->_faces[i];
if (face->getLight() == 0 && !isShadowModeActive())
disableLights();
curMaterial = face->getMaterial();
curMaterial->select();
@ -998,9 +996,6 @@ void GfxOpenGLS::drawMesh(const Mesh *mesh) {
actorShader->setUniform("texScale", Math::Vector2d(_selectedTexture->_width, _selectedTexture->_height));
glDrawArrays(GL_TRIANGLES, *(int *)face->_userData, faces);
if (face->getLight() == 0 && !isShadowModeActive())
enableLights();
}
}