Fix to make two-side texface option work with modifiers in the BGE. However, there appear to be some issues when a mesh has mixed two-side and non two-side faces. I think it's a problem in the converter and possibly related to this bug: https://projects.blender.org/tracker/index.php?func=detail&aid=24948&group_id=9&atid=306

This commit is contained in:
Mitchell Stokes
2011-01-04 07:43:32 +00:00
parent 34fe2cd733
commit f71ff8639c

View File

@@ -784,6 +784,13 @@ void RAS_OpenGLRasterizer::IndexPrimitivesInternal(RAS_MeshSlot& ms, bool multi)
current_mesh = ms.m_mesh;
current_wireframe = wireframe;
MCol *mcol = (MCol*)ms.m_pDerivedMesh->getFaceDataArray(ms.m_pDerivedMesh, CD_MCOL);
// handle two-side
if (current_polymat->GetDrawingMode() & RAS_IRasterizer::KX_TWOSIDE)
this->SetCullFace(false);
else
this->SetCullFace(true);
if (current_polymat->GetFlag() & RAS_BLENDERGLSL) {
// GetMaterialIndex return the original mface material index,
// increment by 1 to match what derived mesh is doing