RigsofRods
Soft-body Physics Simulation
Renderdash.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5 
6  For more information, see http://www.rigsofrods.org/
7 
8  Rigs of Rods is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License version 3, as
10  published by the Free Software Foundation.
11 
12  Rigs of Rods is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #pragma once
22 
23 #include "Application.h"
24 
25 #include <Ogre.h>
26 #include <Overlay/OgreOverlay.h>
27 
28 namespace RoR {
29 
32 
34 class Renderdash: public Ogre::RenderTargetListener
35 {
36 public:
37  Renderdash(std::string const& rg_name, std::string const& tex_name, std::string const& cam_name);
38  ~Renderdash();
39 
40  void setEnable(bool en);
41  Ogre::TexturePtr getTexture() { return m_texture; }
42  Ogre::RenderTarget* getRenderTarget() { return m_rtt_tex; }
43 
44  // Ogre::RenderTargetListener
45  void preRenderTargetUpdate(const Ogre::RenderTargetEvent& evt) override;
46  void postRenderTargetUpdate(const Ogre::RenderTargetEvent& evt) override;
47 
48 private:
49  Ogre::Camera* m_dash_cam;
50  Ogre::RenderTexture* m_rtt_tex;
51  Ogre::TexturePtr m_texture;
52  Ogre::Overlay* m_blend_overlay;
53  Ogre::Overlay* m_dash_overlay;
54  Ogre::Overlay* m_needles_overlay;
55 };
56 
58 
59 } // namespace RoR
RoR::Renderdash::postRenderTargetUpdate
void postRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
Definition: Renderdash.cpp:106
RoR::Renderdash::m_rtt_tex
Ogre::RenderTexture * m_rtt_tex
Definition: Renderdash.h:50
RoR::Renderdash::m_dash_overlay
Ogre::Overlay * m_dash_overlay
Definition: Renderdash.h:53
RoR::Renderdash::getTexture
Ogre::TexturePtr getTexture()
Definition: Renderdash.h:41
RoR::Renderdash::m_blend_overlay
Ogre::Overlay * m_blend_overlay
Definition: Renderdash.h:52
RoR::Renderdash::getRenderTarget
Ogre::RenderTarget * getRenderTarget()
Definition: Renderdash.h:42
RoR::Renderdash::~Renderdash
~Renderdash()
Definition: Renderdash.cpp:75
RoR::Renderdash::Renderdash
Renderdash(std::string const &rg_name, std::string const &tex_name, std::string const &cam_name)
Definition: Renderdash.cpp:35
RoR::Renderdash::m_needles_overlay
Ogre::Overlay * m_needles_overlay
Definition: Renderdash.h:54
RoR::Renderdash::preRenderTargetUpdate
void preRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
Definition: Renderdash.cpp:88
Application.h
Central state/object manager and communications hub.
RoR::Renderdash
'renderdash' is a name of a classic Render-To-Texture animated material with gauges and other dashboa...
Definition: Renderdash.h:34
RoR::Renderdash::m_texture
Ogre::TexturePtr m_texture
Definition: Renderdash.h:51
RoR::Renderdash::m_dash_cam
Ogre::Camera * m_dash_cam
Definition: Renderdash.h:49
RoR::Renderdash::setEnable
void setEnable(bool en)
Definition: Renderdash.cpp:83
RoR
Definition: AppContext.h:36