Revision 115,
956 bytes
checked in by mattausch, 19 years ago
(diff) |
added depth pass algorithm + delayed transparent object rendering (so depth ordering is right)
|
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 | if (mVisualizeCulledNodes) |
---|
25 | { |
---|
26 | mHierarchyInterface->VisualizeCulledNode(node, FRUSTUM_CULLED); |
---|
27 | } |
---|
28 | } |
---|
29 | else |
---|
30 | { |
---|
31 | mHierarchyInterface->SetNodeVisible(node, true); |
---|
32 | mHierarchyInterface->TraverseNode(node); |
---|
33 | } |
---|
34 | } |
---|
35 | } |
---|
36 | |
---|
37 | } // namespace GtpVisibility |
---|
Note: See
TracBrowser
for help on using the repository browser.