30 #include <Overlay/OgreOverlayManager.h>
31 #include <Overlay/OgreOverlay.h>
38 , m_blend_overlay(nullptr)
39 , m_dash_overlay(nullptr)
40 , m_needles_overlay(nullptr)
42 m_texture = Ogre::TextureManager::getSingleton().createManual(
43 tex_name, rg_name, Ogre::TEX_TYPE_2D, 1024, 512, 0, Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET);
47 static int cam_counter = 0;
51 m_dash_cam->setPosition(Ogre::Vector3(0.0, -10000.0, 0.0));
56 v->setClearEveryFrame(
true);
57 v->setBackgroundColour(Ogre::ColourValue::Black);
60 Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().getByName(
"renderdash", rg_name);
61 mat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTexture(
m_texture);
63 m_dash_overlay = Ogre::OverlayManager::getSingleton().getByName(
"tracks/3D_DashboardOverlay");
64 m_needles_overlay = Ogre::OverlayManager::getSingleton().getByName(
"tracks/3D_NeedlesOverlay");
65 m_blend_overlay = Ogre::OverlayManager::getSingleton().getByName(
"tracks/3D_BlendOverlay");
77 if (m_rtt_tex !=
nullptr)
78 m_rtt_tex->removeListener(
this);
80 Ogre::TextureManager::getSingleton().remove(m_texture);
85 m_rtt_tex->setActive(en);
101 m_dash_overlay->show();
102 m_needles_overlay->show();
103 m_blend_overlay->show();
117 m_dash_overlay->hide();
118 m_needles_overlay->hide();
119 m_blend_overlay->hide();