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:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-07-17 09:23:17 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-07-17 09:23:17 +0400
commit90fb63152628927d5d13b0101f4f2dcec025d2f7 (patch)
tree2f5f652729252632e3dc5c74e5c433ca2d297db1 /source/gameengine/Rasterizer/RAS_BucketManager.cpp
parent5ff83fa2b8c63a9267722f01b5626ee0da41adda (diff)
Port a few rasterizer changes from tuhopuu2:
Up the max batch size. Clean up some of the code - move code in headers to source files etc.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_BucketManager.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_BucketManager.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/source/gameengine/Rasterizer/RAS_BucketManager.cpp b/source/gameengine/Rasterizer/RAS_BucketManager.cpp
index e6bdf9143c9..fd2f3a55f1d 100644
--- a/source/gameengine/Rasterizer/RAS_BucketManager.cpp
+++ b/source/gameengine/Rasterizer/RAS_BucketManager.cpp
@@ -60,7 +60,30 @@ RAS_BucketManager::~RAS_BucketManager()
RAS_BucketManagerClearAll();
}
-
+/**
+ * struct alphamesh holds a mesh, (m_ms) it's depth, (m_z) and the bucket it came from (m_bucket.)
+ */
+struct RAS_BucketManager::alphamesh
+{
+public:
+ MT_Scalar m_z;
+ RAS_MaterialBucket::T_MeshSlotList::iterator m_ms;
+ RAS_MaterialBucket *m_bucket;
+ alphamesh(MT_Scalar z, RAS_MaterialBucket::T_MeshSlotList::iterator &ms, RAS_MaterialBucket *bucket) :
+ m_z(z),
+ m_ms(ms),
+ m_bucket(bucket)
+ {}
+};
+
+struct RAS_BucketManager::backtofront
+{
+ bool operator()(const alphamesh &a, const alphamesh &b)
+ {
+ return a.m_z < b.m_z;
+ }
+};
+
void RAS_BucketManager::RenderAlphaBuckets(
const MT_Transform& cameratrans, RAS_IRasterizer* rasty, RAS_IRenderTools* rendertools)