Browse Source

Fixed camera viewmask not being used.

Lasse Öörni 13 years ago
parent
commit
013e4dc833
1 changed files with 5 additions and 3 deletions
  1. 5 3
      Engine/Graphics/View.cpp

+ 5 - 3
Engine/Graphics/View.cpp

@@ -522,7 +522,8 @@ void View::GetDrawables()
     WorkQueue* queue = GetSubsystem<WorkQueue>();
     WorkQueue* queue = GetSubsystem<WorkQueue>();
     PODVector<Drawable*>& tempDrawables = tempDrawables_[0];
     PODVector<Drawable*>& tempDrawables = tempDrawables_[0];
     
     
-    // Get zones and occluders first
+    // Get zones and occluders first. Note: camera viewmask is intentionally disregarded here, to prevent the zone membership
+    // or occlusion depending from the used camera
     {
     {
         ZoneOccluderOctreeQuery query(tempDrawables, camera_->GetFrustum(), DRAWABLE_GEOMETRY | DRAWABLE_ZONE);
         ZoneOccluderOctreeQuery query(tempDrawables, camera_->GetFrustum(), DRAWABLE_GEOMETRY | DRAWABLE_ZONE);
         octree_->GetDrawables(query);
         octree_->GetDrawables(query);
@@ -596,12 +597,13 @@ void View::GetDrawables()
     if (occlusionBuffer_)
     if (occlusionBuffer_)
     {
     {
         OccludedFrustumOctreeQuery query(tempDrawables, camera_->GetFrustum(), occlusionBuffer_, DRAWABLE_GEOMETRY |
         OccludedFrustumOctreeQuery query(tempDrawables, camera_->GetFrustum(), occlusionBuffer_, DRAWABLE_GEOMETRY |
-            DRAWABLE_LIGHT);
+            DRAWABLE_LIGHT, camera_->GetViewMask());
         octree_->GetDrawables(query);
         octree_->GetDrawables(query);
     }
     }
     else
     else
     {
     {
-        FrustumOctreeQuery query(tempDrawables, camera_->GetFrustum(), DRAWABLE_GEOMETRY | DRAWABLE_LIGHT);
+        FrustumOctreeQuery query(tempDrawables, camera_->GetFrustum(), DRAWABLE_GEOMETRY | DRAWABLE_LIGHT,
+            camera_->GetViewMask());
         octree_->GetDrawables(query);
         octree_->GetDrawables(query);
     }
     }