Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2011-01-04 10:43:32 +0300
committerMitchell Stokes <mogurijin@gmail.com>2011-01-04 10:43:32 +0300
commitf71ff8639cecba62c0477790eea8159d6d75e3c5 (patch)
treed914d30279bb5d122eaccbe51d944b6c86977b88
parent34fe2cd733ab02eb33b46488d376f39fce5d52a8 (diff)
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
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 122a738e4f3..e8c2db5526a 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -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