Changeset 159 for trunk/VUT/Ogre/include
- Timestamp:
- 07/06/05 17:52:44 (20 years ago)
- Location:
- trunk/VUT/Ogre/include
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/Ogre/include/OgreItemBufferQueryManager.h
r154 r159 7 7 8 8 /** 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. 10 12 */ 11 13 class __declspec(dllexport) ItemBufferQueryManager: public PlatformQueryManager … … 13 15 public: 14 16 /** 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. 16 19 */ 17 ItemBufferQueryManager(PlatformHierarchyInterface *hierarchyInterface, Viewport *vp); 20 ItemBufferQueryManager(PlatformHierarchyInterface *hierarchyInterface, Viewport *vp, 21 const bool renderPatches); 18 22 19 23 void ComputeCameraVisibility(const Camera &camera, 20 24 InfoContainer<GtpVisibility::NodeInfo> *visibleNodes, 21 25 InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry, 26 InfoContainer<GtpVisibility::PatchInfo> *visiblePatches, 22 27 bool relativeVisibility = false); 23 28 … … 25 30 26 31 protected: 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); 29 38 39 /// if patches are used instead of meshes (only one at a time) 40 bool mRenderPatchesForItemBuffer; 30 41 }; 31 42 -
trunk/VUT/Ogre/include/OgreOcclusionQueriesQueryManager.h
r154 r159 7 7 8 8 /** 9 Class which implements the QueryManager for Ogre scene queries .9 Class which implements the QueryManager for Ogre scene queries using occlusion queries. 10 10 */ 11 11 class __declspec(dllexport) OcclusionQueriesQueryManager: public PlatformQueryManager … … 13 13 public: 14 14 /** Constructor taking a hierarchy interface as an argument. This allows to operate 15 onmdifferent hierarchy types, while reusing the implementation of the query methods.15 on different hierarchy types, while reusing the implementation of the query methods. 16 16 */ 17 17 OcclusionQueriesQueryManager(PlatformHierarchyInterface *hierarchyInterface, Viewport *vp); … … 20 20 InfoContainer<GtpVisibility::NodeInfo> *visibleNodes, 21 21 InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry, 22 InfoContainer<GtpVisibility::PatchInfo> *visiblePatches, 22 23 bool relativeVisibility = false); 23 24 … … 29 30 InfoContainer<GtpVisibility::NodeInfo> *visibleNodes, 30 31 InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry, 32 InfoContainer<GtpVisibility::PatchInfo> *visiblePatches, 31 33 bool relativeVisibility = false); 32 34 -
trunk/VUT/Ogre/include/OgrePlatformQueryManager.h
r154 r159 26 26 InfoContainer<GtpVisibility::NodeInfo> *visibleNodes, 27 27 InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry, 28 InfoContainer<GtpVisibility::PatchInfo> *visiblePatches, 28 29 bool relativeVisibility = false); 29 30 -
trunk/VUT/Ogre/include/OgreVisibilityOctreeSceneManager.h
r139 r159 17 17 occlusion queries for visibility culling. 18 18 */ 19 class VisibilityOctreeSceneManager: public OctreeSceneManager19 class __declspec(dllexport) VisibilityOctreeSceneManager: public OctreeSceneManager 20 20 { 21 21 public: … … 59 59 void WriteLog(); 60 60 61 /** Override pass so we can do the z-fail pass */ 61 /** Override pass so we can do the z-fail pass. 62 */ 62 63 Pass* setPass(Pass* pass); 63 64 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 64 86 protected: 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 */ 66 90 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); 67 100 68 /** Prepares visualization of hierarchical culling. */ 69 void PrepareVisualization(Camera *cam); 101 /// the interface to the scene hierarchy. 70 102 OctreeHierarchyInterface *mHierarchyInterface; 103 /// manages all visibility options 71 104 GtpVisibility::VisibilityManager *mVisibilityManager; 72 105 106 /// if a visualization of the hierarchical culling is shown 73 107 bool mShowVisualization; 74 bool mSkipTransparents; 108 109 /// if the culled nodes are indicated in the visualization 75 110 bool mVisualizeCulledNodes; 76 111 112 /// if symbols for the nodes are shown in the visualization 77 113 bool mRenderNodesForViz; 114 /// if content of the nodes is shown in the visualization 78 115 bool mRenderNodesContentForViz; 116 117 /// render transparents after the hierarchical traversal 79 118 bool mDelayRenderTransparents; 119 120 /// use a depth pass (i.e., fill only the depth buffer in the first pass) 80 121 bool mUseDepthPass; 122 /// flag indicating if we currently render the depth pass 81 123 bool mRenderDepthPass; 82 124 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) 83 136 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; 84 148 }; 85 149 -
trunk/VUT/Ogre/include/OgreVisibilityTerrainSceneManager.h
r158 r159 75 75 /** Override from SceneManager so that sub entities can be assigned an id for item buffer. 76 76 */ 77 Entity* createEntity(const String& entityName, const String& meshName);77 //Entity* createEntity(const String& entityName, const String& meshName); 78 78 79 79 /** Returns pointer to visibility manager. … … 84 84 */ 85 85 OctreeHierarchyInterface *GetHierarchyInterface(); 86 87 void endFrame(); 88 86 89 87 90 protected: … … 142 145 int mLeavePassesInQueue; 143 146 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; 144 152 }; 145 153
Note: See TracChangeset
for help on using the changeset viewer.