Restore shadows when flex is present.
PiperOrigin-RevId: 572936749 Change-Id: I57f8d486810767422bc2874433497eb5073bf63b
This commit is contained in:
committed by
Copybara-Service
parent
60fd6a3298
commit
86859ad382
@@ -413,8 +413,10 @@ static void renderGeom(const mjvGeom* geom, int mode, const float* headpos,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case mjGEOM_FLEX: // flex
|
case mjGEOM_FLEX: // flex
|
||||||
|
{
|
||||||
// no texture for vertices and edges
|
// no texture for vertices and edges
|
||||||
if (glIsEnabled(GL_TEXTURE_2D)) {
|
GLboolean texture_is_enabled = glIsEnabled(GL_TEXTURE_2D);
|
||||||
|
if (texture_is_enabled == GL_TRUE) {
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,7 +470,7 @@ static void renderGeom(const mjvGeom* geom, int mode, const float* headpos,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// restore texture for faces
|
// restore texture for faces
|
||||||
if (glIsEnabled(GL_TEXTURE_2D)) {
|
if (texture_is_enabled == GL_TRUE) {
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -490,6 +492,7 @@ static void renderGeom(const mjvGeom* geom, int mode, const float* headpos,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case mjGEOM_SKIN: // skin
|
case mjGEOM_SKIN: // skin
|
||||||
// vertex positions
|
// vertex positions
|
||||||
|
|||||||
Reference in New Issue
Block a user