Changeset 9448 for code/branches/shaders/src/orxonox/RenderQueueListener.h
- Timestamp:
- Nov 14, 2012, 9:16:18 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/shaders/src/orxonox/RenderQueueListener.h
r9419 r9448 39 39 40 40 #include <OgreRenderQueueListener.h> 41 #include <OgreHardwareOcclusionQuery.h> 41 42 42 43 namespace orxonox … … 47 48 RENDER_QUEUE_STENCIL_OBJECTS = RENDER_QUEUE_MAIN+1, 48 49 RENDER_QUEUE_STENCIL_GLOW = RENDER_QUEUE_MAIN+2, 49 RENDER_QUEUE_STENCIL_LAST = RENDER_QUEUE_STENCIL_GLOW //this is a reference to the last render queue to be affected by stencil glow effects 50 RENDER_QUEUE_STENCIL_LAST = RENDER_QUEUE_STENCIL_GLOW, //this is a reference to the last render queue to be affected by stencil glow effects 51 RENDER_QUEUE_HOQ = RENDER_QUEUE_STENCIL_LAST+1 //this is where we render the objects for occlusion queries (use transparent material) 50 52 }; 51 53 … … 65 67 { 66 68 public: 69 RenderQueueListener(); 70 ~RenderQueueListener(); 71 72 /** 73 @brief 74 This function is returning the current pixel count and resets the pixel state if we're ready to do another Hardware Occlusion Query 75 76 @return 77 current pixel count taken from the last Hardware Occlusion Query 78 */ 79 unsigned int getPixelCount(); 80 67 81 /** 68 82 @brief … … 79 93 */ 80 94 virtual void renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation); 95 96 private: 97 Ogre::HardwareOcclusionQuery* hardwareOcclusionQuery_; //!< this stores the current instance of the HOQ used in the render system 98 unsigned int pixelCount_; //!< this stores the last pixel count returned by the last HOQ in the corresponding render group 99 100 enum PixelState //!< enum to distinguish the several HOQ pixel count states 101 { 102 READY_FOR_RENDER, 103 QUERY_STARTED, 104 READY_FOR_ACCESS 105 }; 106 107 PixelState pixelState_; //!< this stores the current state of the Hardware Occlusion Query 81 108 }; 82 109 }
Note: See TracChangeset
for help on using the changeset viewer.