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:
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.h')
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.h b/source/gameengine/Rasterizer/RAS_MaterialBucket.h
index b07f86b079e..8db75b8b735 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.h
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.h
@@ -32,6 +32,7 @@
#include "RAS_TexVert.h"
#include "GEN_Map.h"
#include "STR_HashedString.h"
+#include "SG_QList.h"
#include "MT_Transform.h"
#include "RAS_IPolygonMaterial.h"
@@ -89,7 +90,9 @@ public:
/* Entry of a RAS_MeshObject into RAS_MaterialBucket */
typedef std::vector<RAS_DisplayArray*> RAS_DisplayArrayList;
-class RAS_MeshSlot
+// The QList is used to link the mesh slots to the object
+// The DList is used to link the visible mesh slots to the material bucket
+class RAS_MeshSlot : public SG_QList
{
friend class RAS_ListRasterizer;
private:
@@ -160,7 +163,11 @@ public:
bool Split(bool force=false);
bool Join(RAS_MeshSlot *target, MT_Scalar distance);
bool Equals(RAS_MeshSlot *target);
+#ifdef USE_SPLIT
bool IsCulled();
+#else
+ bool IsCulled() { return m_bCulled; }
+#endif
void SetCulled(bool culled) { m_bCulled = culled; }
};
@@ -171,7 +178,6 @@ class RAS_MeshMaterial
public:
RAS_MeshSlot *m_baseslot;
class RAS_MaterialBucket *m_bucket;
-
GEN_Map<GEN_HashedPtr,RAS_MeshSlot*> m_slots;
};
@@ -208,10 +214,23 @@ public:
class RAS_MeshSlot* CopyMesh(class RAS_MeshSlot *ms);
void RemoveMesh(class RAS_MeshSlot* ms);
void Optimize(MT_Scalar distance);
+ void ActivateMesh(RAS_MeshSlot* slot)
+ {
+ m_activeMeshSlotsHead.AddBack(slot);
+ }
+ SG_DList& GetActiveMeshSlots()
+ {
+ return m_activeMeshSlotsHead;
+ }
+ RAS_MeshSlot* GetNextActiveMeshSlot()
+ {
+ return (RAS_MeshSlot*)m_activeMeshSlotsHead.Remove();
+ }
private:
- list<RAS_MeshSlot> m_meshSlots;
+ list<RAS_MeshSlot> m_meshSlots; // all the mesh slots
RAS_IPolyMaterial* m_material;
+ SG_DList m_activeMeshSlotsHead; // only those which must be rendered
};