Changeset 360 for branches/Dirk_RenderTraversalWork/Source/System/Action/RenderTraversal/OSGScreenLOD.inl
- Timestamp:
- 10/23/06 12:00:07 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Dirk_RenderTraversalWork/Source/System/Action/RenderTraversal/OSGScreenLOD.inl
r359 r360 45 45 { 46 46 RenderTraversalActionT *ra = dynamic_cast<RenderTraversalActionT *>(action); 47 DrawActionBase *da = dynamic_cast<DrawActionBase *>(action); 47 48 48 49 UInt32 numLevels = action->getNNodes(); … … 53 54 Int32 index = 0; 54 55 55 if(numLevels > 1 )56 if(numLevels > 1 || ra->getScreenLODCoverageThreshold() == 0.f) 56 57 { 57 58 Matrixr worldToScreen; 59 #if 1 58 60 Camera* cam = ra->getCamera(); 59 61 Viewport* vp = ra->getViewport(); 60 62 cam->getWorldToScreen(worldToScreen, *vp); 63 #endif 64 #if 0 65 worldToScreen = da->getDrawEnv()->getWorldToScreen(); 66 #endif 61 67 62 68 DynamicVolume volume = ra->getActNode()->getVolume(); … … 103 109 //Real32 pix = cbb * vp->getPixelWidth() * vp->getPixelHeight(); 104 110 105 #if 0 111 #if 0 106 112 //THIS IS WHAT I WANT TO DO....but the calls to validate never return 107 113 Geometry* pmin = dynamic_cast<Geometry *>(getCPtr(action->getNode(0))); … … 130 136 } 131 137 #endif 132 133 Real32 degradation_base = 0.05;138 #if 1 139 Real32 degradation_base = ra->getScreenLODCoverageThreshold(); 134 140 while(cbb < degradation_base) 135 141 { … … 142 148 } 143 149 } 150 #endif 144 151 } 145 152
