[Bf-blender-cvs] [59bbe1a] soc-2013-paint: Revert "Fix T40257: Frustum culling not working properly"

Mitchell Stokes noreply at git.blender.org
Sat Jul 12 12:44:44 CEST 2014


Commit: 59bbe1aa61fcb590b1b046a10eea675cc1947615
Author: Mitchell Stokes
Date:   Wed Jul 9 22:34:45 2014 -0700
https://developer.blender.org/rB59bbe1aa61fcb590b1b046a10eea675cc1947615

Revert "Fix T40257: Frustum culling not working properly"

This reverts commit 978dba4616852e0b94374f2ae56934049d9b3669. The change
still doesn't provide accurate culling information, and actually breaks
animation culling.

===================================================================

M	source/gameengine/Ketsji/KX_GameObject.cpp
M	source/gameengine/Ketsji/KX_GameObject.h

===================================================================

diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index f61d08e..de528ae 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -928,27 +928,6 @@ KX_GameObject::SetVisible(
 	}
 }
 
-bool KX_GameObject::GetCulled()
-{
-	// If we're set to not cull, double-check with
-	// the mesh slots first. This is kind of nasty, but
-	// it allows us to get proper culling information.
-	if (!m_bCulled)
-	{
-		SG_QList::iterator<RAS_MeshSlot> mit(m_meshSlots);
-		for (mit.begin(); !mit.end(); ++mit)
-		{
-			if ((*mit)->m_bCulled)
-			{
-				m_bCulled = true;
-				break;
-			}
-		}
-	}
-
-	return m_bCulled;
-}
-
 static void setOccluder_recursive(SG_Node* node, bool v)
 {
 	NodeList& children = node->GetSGChildren();
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index f7f40ac..7450be4 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -852,10 +852,10 @@ public:
 	/**
 	 * Was this object culled?
 	 */
-	bool
+	inline bool
 	GetCulled(
 		void
-	);
+	) { return m_bCulled; }
 
 	/**
 	 * Set culled flag of this object




More information about the Bf-blender-cvs mailing list