Ignore:
Timestamp:
05/30/05 03:20:23 (19 years ago)
Author:
mattausch
Message:

added depth pass algorithm + delayed transparent object rendering (so depth ordering is right)

Location:
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/include/OgreOctreeSceneManager.h

    r112 r115  
    105105        /** Renders one octant of an octree, i.e., renders current octant 
    106106                node and does not traverse deeper into the tree. 
     107 
    107108                @remark Note that OctreeNode instances are NOT part of the octree  
    108109                hierarchy, instead one octant of an Octree contains many OctreeNode instances. 
    109                 @param octree the octree to be rendered 
     110                 
    110111                @param cam current camera 
     112                @param octree the octant to be rendered (without children) 
     113                @param onlyShadowCasters if only shadow casters are rendered 
     114                @param leaveTransparentsInQueue if transparemt should be left in queue for later processing 
    111115        */ 
    112         void _renderOctant(Camera* cam, Octree *octree, bool onlyShadowCasters); 
     116        void _renderOctant(Camera* cam, Octree *octree, bool onlyShadowCasters, bool leaveTransparentsInQueue = false); 
    113117 
    114118        /** Returns stored list of boxes */ 
     
    214218    IntersectionSceneQuery* createIntersectionQuery(unsigned long mask); 
    215219 
     220 
    216221protected: 
    217222 
  • trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreOctree.cpp

    r61 r115  
    109109                mDepth = 0; 
    110110 
    111         //matt: remove later 
    112         //char msg[100]; 
    113         //sprintf(msg, "creating new octant in depth %d", mDepth); 
    114         //OutputDebugString(msg); 
    115  
    116111#endif //GTP_VISIBILITY_MODIFIED_OGRE 
    117112    mNumNodes = 0; 
     
    171166 
    172167        mWireBoundingBox->setupBoundingBox(mBox); 
    173  
    174         // matt: change this back 
    175         //AxisAlignedBox box; _getCullBounds(&box);  
    176         //mWireBoundingBox->setupBoundingBox(box); 
    177  
    178168    return mWireBoundingBox; 
    179169} 
  • trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreOctreeSceneManager.cpp

    r112 r115  
    3939#include <OgreOctreeCamera.h> 
    4040#include <OgreRenderSystem.h> 
    41 #include <windows.h> 
     41 
    4242 
    4343extern "C" 
     
    508508        } 
    509509 
    510                 //matt: remove later 
    511                 //OutputDebugString("adding octree node\n"); 
    512                  
    513  
    514510        _addOctreeNode( n, octant -> mChildren[ x ][ y ][ z ], ++depth ); 
    515511 
     
    11731169} 
    11741170//----------------------------------------------------------------------- 
    1175 void OctreeSceneManager::_renderOctant(Camera *cam, Octree *octant, bool onlyShadowCasters) 
     1171void OctreeSceneManager::_renderOctant(Camera *cam, Octree *octant, bool onlyShadowCasters,  
     1172                                                                           bool leaveTransparentsInQueue)//, bool useZPassQueue) 
    11761173{ 
    11771174        //Add stuff to be rendered; 
     
    11881185                { 
    11891186                        sn->_addToRenderQueue(cam, getRenderQueue(), onlyShadowCasters); 
    1190                         //node->_findVisibleObjects(cam, getRenderQueue(), false, mDisplayNodes, false); 
    11911187                        mVisible.push_back(sn); 
    11921188 
     
    12071203        if (mShowBoxes) 
    12081204        { 
     1205                octant->getWireBoundingBox()->setMaterial("BaseWhiteNoLighting"); 
     1206 
    12091207                getRenderQueue()->addRenderable(octant->getWireBoundingBox()); 
    12101208                mBoxes.push_back(octant->getWireBoundingBox()); 
    12111209        } 
    12121210 
     1211        //-- the actual rendering 
    12131212        SceneManager::_renderVisibleObjects(); 
    1214  
    12151213        // delete all rendered objects from the render queue 
    1216         _deleteRenderedQueueGroups(); 
     1214        _deleteRenderedQueueGroups(leaveTransparentsInQueue); 
    12171215} 
    12181216#endif // GTP_VISIBILITY_MODIFIED_OGRE 
Note: See TracChangeset for help on using the changeset viewer.