Changeset 159 for trunk/VUT/Ogre/include


Ignore:
Timestamp:
07/06/05 17:52:44 (19 years ago)
Author:
mattausch
Message:

added flags for switching on/off transparents for item buffer and vertex programs for depth pass / item buffer

Location:
trunk/VUT/Ogre/include
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/Ogre/include/OgreItemBufferQueryManager.h

    r154 r159  
    77   
    88/** 
    9         Class which implements the QueryManager for Ogre scene queries. 
     9        Class which implements the QueryManager for Ogre scene queries using an item buffer, 
     10        i.e., the objects are rendered with their id used as unique color code. After reading 
     11        back the frame buffer, the visibility information can be established for each object. 
    1012*/ 
    1113class __declspec(dllexport) ItemBufferQueryManager: public PlatformQueryManager 
     
    1315public: 
    1416    /** Constructor taking a hierarchy interface as an argument. This allows to operate 
    15         onm different hierarchy types, while reusing the implementation of the query methods. 
     17                on different hierarchy types, while reusing the implementation of the query methods. 
     18                @param renderPatches determines if the visibility of either patches or meshes is computed. 
    1619    */ 
    17         ItemBufferQueryManager(PlatformHierarchyInterface *hierarchyInterface, Viewport *vp); 
     20        ItemBufferQueryManager(PlatformHierarchyInterface *hierarchyInterface, Viewport *vp, 
     21                                                   const bool renderPatches); 
    1822     
    1923    void ComputeCameraVisibility(const Camera &camera, 
    2024                            InfoContainer<GtpVisibility::NodeInfo> *visibleNodes, 
    2125                            InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry, 
     26                                InfoContainer<GtpVisibility::PatchInfo> *visiblePatches, 
    2227                            bool relativeVisibility = false); 
    2328     
     
    2530         
    2631protected: 
    27         void InitItemBuffer( InfoContainer<GtpVisibility::NodeInfo> *visibleNodes, 
    28                             InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry); 
     32        /** Helper function used to initialise item buffer. 
     33        */ 
     34        void InitItemBuffer(  
     35                                InfoContainer<GtpVisibility::NodeInfo> *visibleNodes, 
     36                            InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry, 
     37                                InfoContainer<GtpVisibility::PatchInfo> *visiblePatches); 
    2938         
     39        /// if patches are used instead of meshes (only one at a time) 
     40        bool mRenderPatchesForItemBuffer; 
    3041}; 
    3142 
  • trunk/VUT/Ogre/include/OgreOcclusionQueriesQueryManager.h

    r154 r159  
    77   
    88/** 
    9         Class which implements the QueryManager for Ogre scene queries. 
     9        Class which implements the QueryManager for Ogre scene queries using occlusion queries. 
    1010*/ 
    1111class __declspec(dllexport) OcclusionQueriesQueryManager: public PlatformQueryManager 
     
    1313public: 
    1414    /** Constructor taking a hierarchy interface as an argument. This allows to operate 
    15         onm different hierarchy types, while reusing the implementation of the query methods. 
     15                on different hierarchy types, while reusing the implementation of the query methods. 
    1616    */ 
    1717        OcclusionQueriesQueryManager(PlatformHierarchyInterface *hierarchyInterface, Viewport *vp); 
     
    2020                            InfoContainer<GtpVisibility::NodeInfo> *visibleNodes, 
    2121                            InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry, 
     22                                InfoContainer<GtpVisibility::PatchInfo> *visiblePatches, 
    2223                            bool relativeVisibility = false); 
    2324     
     
    2930                               InfoContainer<GtpVisibility::NodeInfo> *visibleNodes, 
    3031                               InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry, 
     32                                   InfoContainer<GtpVisibility::PatchInfo> *visiblePatches, 
    3133                               bool relativeVisibility = false); 
    3234     
  • trunk/VUT/Ogre/include/OgrePlatformQueryManager.h

    r154 r159  
    2626                               InfoContainer<GtpVisibility::NodeInfo> *visibleNodes, 
    2727                               InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry, 
     28                                   InfoContainer<GtpVisibility::PatchInfo> *visiblePatches, 
    2829                               bool relativeVisibility = false); 
    2930     
  • trunk/VUT/Ogre/include/OgreVisibilityOctreeSceneManager.h

    r139 r159  
    1717        occlusion queries for visibility culling. 
    1818*/ 
    19 class VisibilityOctreeSceneManager: public OctreeSceneManager 
     19class __declspec(dllexport) VisibilityOctreeSceneManager: public OctreeSceneManager 
    2020{ 
    2121public: 
     
    5959        void WriteLog(); 
    6060 
    61         /** Override pass so we can do the z-fail pass */ 
     61        /** Override pass so we can do the z-fail pass.  
     62        */ 
    6263        Pass* setPass(Pass* pass); 
    6364 
     65        /** Override from SceneManager so we can skip all but first pass for depth pass.  
     66        */ 
     67        bool validatePassForRendering(Pass* pass); 
     68 
     69        void RenderItemBuffer(RenderPriorityGroup* pGroup); 
     70        void RenderSingleObjectForItemBuffer(Renderable *rend, Pass *pass); 
     71        void renderQueueGroupObjects(RenderQueueGroup* pGroup); 
     72 
     73        /** Override from SceneManager so that sub entities can be assigned an id for item buffer. 
     74        */ 
     75        //Entity* createEntity(const String& entityName, const String& meshName); 
     76 
     77        /** Returns pointer to visibility manager. 
     78        */ 
     79        GtpVisibility::VisibilityManager *GetVisibilityManager(); 
     80 
     81        /** Returns hierarchy interface. 
     82        */ 
     83        OctreeHierarchyInterface *GetHierarchyInterface(); 
     84 
     85 
    6486protected: 
    65         /** Creates material for depth pass, e.g., a pass that only fills the depth buffer */ 
     87         
     88        /** Creates material for depth pass, e.g., a pass that only fills the depth buffer.  
     89        */ 
    6690        void InitDepthPass(); 
     91        /** Creates material for item buffer.  
     92        */ 
     93        void InitItemBufferPass(); 
     94        /** Fills render queue so that a visualization can be rendered.  
     95        */ 
     96        void PrepareVisualization(Camera *cam); 
     97        /** Initialises necessary parameters for hierarchical visibility culling. 
     98        */ 
     99        void InitVisibilityCulling(Camera *cam); 
    67100         
    68         /** Prepares visualization of hierarchical culling. */ 
    69         void PrepareVisualization(Camera *cam); 
     101        /// the interface to the scene hierarchy. 
    70102        OctreeHierarchyInterface *mHierarchyInterface; 
     103        /// manages all visibility options 
    71104        GtpVisibility::VisibilityManager *mVisibilityManager; 
    72105         
     106        /// if a visualization of the hierarchical culling is shown 
    73107        bool mShowVisualization; 
    74         bool mSkipTransparents; 
     108 
     109        /// if the culled nodes are indicated in the visualization 
    75110        bool mVisualizeCulledNodes; 
    76111 
     112        /// if symbols for the nodes are shown in the visualization 
    77113        bool mRenderNodesForViz; 
     114        /// if content of the nodes is shown in the visualization 
    78115        bool mRenderNodesContentForViz; 
     116 
     117        /// render transparents after the hierarchical traversal 
    79118        bool mDelayRenderTransparents; 
     119 
     120        /// use a depth pass (i.e., fill only the depth buffer in the first pass) 
    80121        bool mUseDepthPass; 
     122        /// flag indicating if we currently render the depth pass 
    81123        bool mRenderDepthPass; 
    82124 
     125        /// if we use an item buffer for rendering (i.e., object ids as color codes 
     126        bool mUseItemBuffer; 
     127        /// if we currently render the item buffer  
     128        bool mRenderItemBuffer; 
     129 
     130        /// if depth write should be enabled 
     131        bool mEnableDepthWrite; 
     132        /// if transparents are skipped during rendering 
     133        bool mSkipTransparents; 
     134 
     135        /// the depth pass (no lighting, just filling the depth buffer) 
    83136        Pass *mDepthPass; 
     137        Pass *mItemBufferPass; 
     138 
     139        int mCurrentEntityId; 
     140        /// flag for passes which should not be deleted from queue during first traversal 
     141        int mLeavePassesInQueue; 
     142        ShadowTechnique mSavedShadowTechnique; 
     143 
     144        /// if transparent object are considered for item buffer visibility 
     145        bool mRenderTransparentsForItemBuffer; 
     146        /// Always execute the vertex program of a pass, e.g., for the depth pass or item buffer 
     147        bool mExecuteVertexProgramForAllPasses; 
    84148}; 
    85149 
  • trunk/VUT/Ogre/include/OgreVisibilityTerrainSceneManager.h

    r158 r159  
    7575        /** Override from SceneManager so that sub entities can be assigned an id for item buffer. 
    7676        */ 
    77         Entity* createEntity(const String& entityName, const String& meshName); 
     77        //Entity* createEntity(const String& entityName, const String& meshName); 
    7878 
    7979        /** Returns pointer to visibility manager. 
     
    8484        */ 
    8585        OctreeHierarchyInterface *GetHierarchyInterface(); 
     86 
     87        void endFrame(); 
     88 
    8689 
    8790protected: 
     
    142145        int mLeavePassesInQueue; 
    143146        ShadowTechnique mSavedShadowTechnique; 
     147 
     148        /// if transparent object are considered for item buffer visibility 
     149        bool mRenderTransparentsForItemBuffer; 
     150        /// Always execute the vertex program of a pass, e.g., for the depth pass or item buffer 
     151        bool mExecuteVertexProgramForAllPasses; 
    144152}; 
    145153 
Note: See TracChangeset for help on using the changeset viewer.