Line | |
---|
1 | #include "FrustumCullingManager.h" |
---|
2 | #include <OgreLogManager.h> |
---|
3 | |
---|
4 | namespace GtpVisibility { |
---|
5 | |
---|
6 | //----------------------------------------------------------------------- |
---|
7 | void FrustumCullingManager::RenderScene() |
---|
8 | { |
---|
9 | //InitFrame(); |
---|
10 | |
---|
11 | while (!mHierarchyInterface->GetQueue()->empty()) |
---|
12 | { |
---|
13 | HierarchyNode *node = mHierarchyInterface->GetQueue()->top(); |
---|
14 | mHierarchyInterface->GetQueue()->pop(); |
---|
15 | |
---|
16 | // interesting for visualization purpose |
---|
17 | mHierarchyInterface->SetNodeVisible(node, false); |
---|
18 | mHierarchyInterface->SetLastVisited(node, mHierarchyInterface->GetFrameId()); |
---|
19 | |
---|
20 | if (!mHierarchyInterface->CheckFrustumVisible(node)) |
---|
21 | {//if (mHierarchyInterface->mIsShadowPass) |
---|
22 | mNumFrustumCulledNodes ++; |
---|
23 | } |
---|
24 | else |
---|
25 | { |
---|
26 | mHierarchyInterface->SetNodeVisible(node, true); |
---|
27 | mHierarchyInterface->TraverseNode(node); |
---|
28 | } |
---|
29 | } |
---|
30 | } |
---|
31 | |
---|
32 | } // namespace GtpVisibility |
---|
Note: See
TracBrowser
for help on using the repository browser.