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:
parent
7108b8cbe9
commit
c57691c751
1 changed files with 0 additions and 5 deletions
|
@ -980,8 +980,6 @@ void GfxOpenGLS::drawMesh(const Mesh *mesh) {
|
||||||
const Material *curMaterial = NULL;
|
const Material *curMaterial = NULL;
|
||||||
for (int i = 0; i < mesh->_numFaces;) {
|
for (int i = 0; i < mesh->_numFaces;) {
|
||||||
const MeshFace *face = &mesh->_faces[i];
|
const MeshFace *face = &mesh->_faces[i];
|
||||||
if (face->getLight() == 0 && !isShadowModeActive())
|
|
||||||
disableLights();
|
|
||||||
|
|
||||||
curMaterial = face->getMaterial();
|
curMaterial = face->getMaterial();
|
||||||
curMaterial->select();
|
curMaterial->select();
|
||||||
|
@ -998,9 +996,6 @@ void GfxOpenGLS::drawMesh(const Mesh *mesh) {
|
||||||
actorShader->setUniform("texScale", Math::Vector2d(_selectedTexture->_width, _selectedTexture->_height));
|
actorShader->setUniform("texScale", Math::Vector2d(_selectedTexture->_width, _selectedTexture->_height));
|
||||||
|
|
||||||
glDrawArrays(GL_TRIANGLES, *(int *)face->_userData, faces);
|
glDrawArrays(GL_TRIANGLES, *(int *)face->_userData, faces);
|
||||||
|
|
||||||
if (face->getLight() == 0 && !isShadowModeActive())
|
|
||||||
enableLights();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue