Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
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
28namespace RoR {
29
32
34class Renderdash: public Ogre::RenderTargetListener
35{
36public:
37 Renderdash(std::string const& rg_name, std::string const& tex_name, std::string const& cam_name);
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
48private:
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
Central state/object manager and communications hub.
'renderdash' is a name of a classic Render-To-Texture animated material with gauges and other dashboa...
Definition Renderdash.h:35
void preRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
void postRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
Ogre::TexturePtr getTexture()
Definition Renderdash.h:41
void setEnable(bool en)
Ogre::Camera * m_dash_cam
Definition Renderdash.h:49
Ogre::TexturePtr m_texture
Definition Renderdash.h:51
Ogre::Overlay * m_needles_overlay
Definition Renderdash.h:54
Ogre::RenderTarget * getRenderTarget()
Definition Renderdash.h:42
Ogre::RenderTexture * m_rtt_tex
Definition Renderdash.h:50
Ogre::Overlay * m_dash_overlay
Definition Renderdash.h:53
Ogre::Overlay * m_blend_overlay
Definition Renderdash.h:52