Changeset 11075
- Timestamp:
- Jan 18, 2016, 10:35:11 PM (9 years ago)
- Location:
- code/branches/shaders_merge/src/orxonox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/shaders_merge/src/orxonox/RenderQueueListener.cc
r11074 r11075 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau 24 * Reto Grieder (physics) 23 * David 'davidsa' Salvisberg 25 24 * Co-authors: 26 25 * ... … … 41 40 namespace orxonox 42 41 { 43 RenderQueueListener::RenderQueueListener() : pixelCount_(0), pixelState_( RenderQueueListener::READY_FOR_RENDER)42 RenderQueueListener::RenderQueueListener() : pixelCount_(0), pixelState_(PixelState::READY_FOR_RENDER) 44 43 { 45 44 hardwareOcclusionQuery_ = Ogre::Root::getSingleton().getRenderSystem()->createHardwareOcclusionQuery(); //create a new HOQ for the scene this listener is used in … … 60 59 unsigned int RenderQueueListener::getPixelCount() 61 60 { 62 if(this->pixelState_== RenderQueueListener::READY_FOR_ACCESS)61 if(this->pixelState_==PixelState::READY_FOR_ACCESS) 63 62 { 64 63 this->hardwareOcclusionQuery_->pullOcclusionQuery(&(this->pixelCount_)); 65 this->pixelState_= RenderQueueListener::READY_FOR_RENDER;64 this->pixelState_=PixelState::READY_FOR_RENDER; 66 65 } 67 66 return this->pixelCount_; … … 94 93 Ogre::SOP_KEEP,Ogre::SOP_KEEP,Ogre::SOP_REPLACE,false); 95 94 } 96 if (queueGroupId == RENDER_QUEUE_HOQ && this->pixelState_== RenderQueueListener::READY_FOR_RENDER)95 if (queueGroupId == RENDER_QUEUE_HOQ && this->pixelState_==PixelState::READY_FOR_RENDER) 97 96 { 98 97 this->hardwareOcclusionQuery_->beginOcclusionQuery(); 99 this->pixelState_= RenderQueueListener::QUERY_STARTED;98 this->pixelState_=PixelState::QUERY_STARTED; 100 99 //TODO: Skip this rendering step altogheter if we haven't requested the pixel count yet, not sure if this is possible without a custom SceneManager 101 100 } … … 116 115 renderSystem->setStencilBufferParams(); 117 116 } 118 if (queueGroupId == RENDER_QUEUE_HOQ && this->pixelState_== RenderQueueListener::QUERY_STARTED)117 if (queueGroupId == RENDER_QUEUE_HOQ && this->pixelState_==PixelState::QUERY_STARTED) 119 118 { 120 119 this->hardwareOcclusionQuery_->endOcclusionQuery(); 121 this->pixelState_= RenderQueueListener::READY_FOR_ACCESS;120 this->pixelState_=PixelState::READY_FOR_ACCESS; 122 121 } 123 122 } -
code/branches/shaders_merge/src/orxonox/RenderQueueListener.h
r11074 r11075 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau 24 * Reto Grieder (physics) 23 * David 'davidsa' Salvisberg 25 24 * Co-authors: 26 25 * ... … … 52 51 }; 53 52 54 const int STENCIL_VALUE_FOR_GLOW = 1; //!< this is a reference value for our mask,53 constexpr int STENCIL_VALUE_FOR_GLOW = 1; //!< this is a reference value for our mask, 55 54 //!< if more than one type of stencil mask is to be used, each of them need their own value 56 const int STENCIL_FULL_MASK = 0xFFFFFFFF; //!< this is a reference mask used in our stencil buffer55 constexpr int STENCIL_FULL_MASK = 0xFFFFFFFF; //!< this is a reference mask used in our stencil buffer 57 56 58 57 /** … … 85 84 In this case we use it to set the stencil buffer parameters of the render system 86 85 */ 87 virtual void renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation) ;86 virtual void renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation) override; 88 87 /** 89 88 @brief … … 92 91 in this case we use it to unset the stencil buffer parameters, so the rest of the render queue is unaffected by it. 93 92 */ 94 virtual void renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation) ;93 virtual void renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation) override; 95 94 96 95 private: … … 98 97 unsigned int pixelCount_; //!< this stores the last pixel count returned by the last HOQ in the corresponding render group 99 98 100 enum PixelState //!< enum to distinguish the several HOQ pixel count states99 enum class PixelState //!< enum to distinguish the several HOQ pixel count states 101 100 { 102 101 READY_FOR_RENDER, -
code/branches/shaders_merge/src/orxonox/graphics/Billboard.cc
r11073 r11075 175 175 { 176 176 Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet(); 177 if( bSet != NULL)177 if( bSet != nullptr ) 178 178 { 179 179 bSet->setRenderQueueGroup(groupID); … … 184 184 { 185 185 Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet(); 186 if( bSet != NULL)186 if( bSet != nullptr ) 187 187 { 188 188 bSet->setBounds(Ogre::AxisAlignedBox(Ogre::AxisAlignedBox::EXTENT_INFINITE),0); -
code/branches/shaders_merge/src/orxonox/graphics/LensFlare.cc
r11074 r11075 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau 24 * Reto Grieder (physics) 23 * David 'davidsa' Salvisberg 25 24 * Co-authors: 26 25 * ... -
code/branches/shaders_merge/src/orxonox/graphics/LensFlare.h
r11074 r11075 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau 24 * Reto Grieder (physics) 23 * David 'davidsa' Salvisberg 25 24 * Co-authors: 26 25 * ... … … 164 163 { return this->fadeOnViewBorder_; } 165 164 166 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;165 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 167 166 168 virtual void tick(float dt) ;167 virtual void tick(float dt) override; 169 168 170 virtual void changedVisibility() ;169 virtual void changedVisibility() override; 171 170 172 171 private:
Note: See TracChangeset
for help on using the changeset viewer.