[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34057] trunk/blender/source/gameengine/ Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp: Fix to make two-side texface option work with modifiers in the BGE.

Mitchell Stokes mogurijin at gmail.com
Tue Jan 4 08:43:32 CET 2011


Revision: 34057
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34057
Author:   moguri
Date:     2011-01-04 08:43:32 +0100 (Tue, 04 Jan 2011)

Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp

Modified: trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
===================================================================
--- trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp	2011-01-04 07:32:26 UTC (rev 34056)
+++ trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp	2011-01-04 07:43:32 UTC (rev 34057)
@@ -784,6 +784,13 @@
 		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





More information about the Bf-blender-cvs mailing list