VR-Vantage
Loading...
Searching...
No Matches
DtRenderer.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2026 MAK Technologies, Inc.
3** All rights reserved.
4*******************************************************************************/
5
9
10#pragma once
11#include <vrvCore/vrvCore.h>
12#include <vrvCore/DtUniqueID.h>
13
16
17#include <vrvUtil/signalslib.h>
18#include <unordered_map>
19
20namespace makVrv
21{
22
23 class DtDe;
25 class DtOverlayManager;
29 class DtChannel;
30 class DtDebugShapes;
33
47
50 {
51 public:
52
56 typedef std::unordered_map<DtElementID, double> DtRenderMap;
57
60
62 virtual ~DtRenderer();
63
65 virtual void update();
66
68 virtual void postUpdate();
69
72
76
80
84
88
91
94 virtual bool exportTerrainAndProps(const std::string&) = 0;
95
97 virtual void render() = 0;
98
100 virtual void resetSceneGraph() = 0;
101
104 virtual void removeChannelRoot(DtChannel* channel) = 0;
105
107 virtual void setWireframeRendering(bool enabled) = 0;
108
110 virtual bool wireframeRendering() const = 0;
111
113 virtual void setShadowState(bool enabled) =0;
114
116 virtual bool shadowsEnabled() const = 0;
117
119 virtual void releaseResources() = 0;
120
122 virtual void resetGlobalState() = 0;
123
126 boost::signalslib::signal<void (double simTime)> signal_update;
127
131 boost::signalslib::signal<void (double simTime)> signal_preObserverUpdate;
132
135 boost::signalslib::signal<void (double simTime)> signal_postUpdate;
136
139 boost::signalslib::signal<void ()> signal_releaseResources;
140
143 virtual bool makeContextCurrent() = 0;
144
147 virtual const DtFontManagerInterface& fontManager() const = 0;
148
151 virtual void createManagers();
152
156 inline const DtRenderMap& renderMap() const
157 {
158 return myRenderMap;
159 }
160
164 virtual void cleanup() = 0;
165
167 virtual void setNewProfilerState(int value) = 0;
169 virtual int newProfilerState() = 0;
170
171 protected:
172
183 };
184
188 {
189 public:
190
194
196 static void registerInstance(DtDe& de, DtRendererCreator* anInstance);
197
199 virtual DtRenderer* create(DtDe& de) = 0;
200 };
201
202
203
204}
Base class to provide boost signal/slot management.
Contains makVrv::DtUniqueID type.
Contains makVrv::DtVirtualBaseClass class.
The abstract Channel Class.
Definition DtChannel.h:36
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer,...
Definition DtDe.h:77
Definition DtDebugShapes.h:61
Definition DtFontManagerInterface.h:26
Definition DtGeom3dLinesSystem.h:63
Definition DtGeom3dSpheresSystem.h:63
Definition DtIndirectEntityManager.h:22
Definition DtObserverObjectManager.h:26
Abstract base class for managing the overlays.
Definition DtOverlayManager.h:32
Abstract creator base class.
Definition DtRenderer.h:188
virtual DtRenderer * create(DtDe &de)=0
Create a DtRenderer.
static DtRendererCreator & instance(DtDe &de)
Get the creator instance for this IG object.
static void registerInstance(DtDe &de, DtRendererCreator *anInstance)
Register the creator instance with an IG.
The DtRenderer is the component responsible for rendering 3D images onto the screen.
Definition DtRenderer.h:50
virtual void setNewProfilerState(int value)=0
used for turning on and off tracy at the top level to avoid problems
virtual ~DtRenderer()
DTOR.
boost::signalslib::signal< void(double simTime)> signal_update
Signal used to update systems. Connect functions to this signal that need to be called once per tick ...
Definition DtRenderer.h:126
virtual void postUpdate()
Called after tick; time to update observers.
virtual void resetSceneGraph()=0
Removes all nodes from the scene graph.
virtual void createManagers()
virtual void resetGlobalState()=0
Reset any global rendering state (e.g. useNvgl in osgEarth).
DtGeom3dSpheresSystem * myGeom3dSpheresSystem
Definition DtRenderer.h:181
DtOverlayManager & overlayManager()
Get the manager's over the 2D overlays.
boost::signalslib::signal< void()> signal_releaseResources
Signal used to update systems. Connect functions to this signal that need to be called once per tick ...
Definition DtRenderer.h:139
DtDebugShapes & debugShapes()
Get the debug shapes object for use with debugging geometry shapes.
boost::signalslib::signal< void(double simTime)> signal_preObserverUpdate
Signal used to update systems. Connect functions to this signal that need to be called once per tick ...
Definition DtRenderer.h:131
virtual bool makeContextCurrent()=0
DtRenderMap myRenderMap
Definition DtRenderer.h:178
const DtTickableManagerInterface & tickableManager() const
DtRenderer(DtDe &de)
CTOR.
virtual void setWireframeRendering(bool enabled)=0
Turn wireframe mode on/off.
DtGeom3dLinesSystem * myGeom3dLinesSystem
Definition DtRenderer.h:180
const DtRenderMap & renderMap() const
Definition DtRenderer.h:156
DtSignalConnectionManager myConnections
Definition DtRenderer.h:179
DtDebugShapes * myDebugShapes
Definition DtRenderer.h:182
const DtOverlayManager & overlayManager() const
virtual const DtFontManagerInterface & fontManager() const =0
virtual void update()
Abstract update.
virtual bool wireframeRendering() const =0
Get status of wireframe mode.
DtTickableManagerInterface & tickableManager()
Get the scene manager's attachable scene object manager.
const DtGeom3dSpheresSystem & geom3dSpheresSystem() const
DtIndirectEntityManager & myIndirectEntityManager
Definition DtRenderer.h:177
DtDe & myDe
Definition DtRenderer.h:173
std::unordered_map< DtElementID, double > DtRenderMap
Definition DtRenderer.h:56
virtual bool shadowsEnabled() const =0
Get status of shadow mode.
virtual int newProfilerState()=0
used for turning on and off tracy at the top level to avoid problems
DtOverlayManager * myOverlayManager
Definition DtRenderer.h:176
DtTickableManagerInterface * myTickableManager
Definition DtRenderer.h:175
virtual void releaseResources()=0
Release all openGL objects in the scene graph.
DtObserverObjectManager * observerObjectManager()
Get the observer object manager.
DtObserverObjectManager * myObserverObjectManager
Definition DtRenderer.h:174
DtGeom3dLinesSystem & geom3dLinesSystem()
Get the geometry lines component system.
virtual void removeChannelRoot(DtChannel *channel)=0
Checks to see if this channel has a root, and, if it does, remove it from all model set roots....
const DtGeom3dLinesSystem & geom3dLinesSystem() const
virtual void render()=0
Abstract render.
virtual bool exportTerrainAndProps(const std::string &)=0
Saves terrain geometry and props to specified file. This file will be saved in the format specified b...
DtGeom3dSpheresSystem & geom3dSpheresSystem()
Get the geometry spheres component system.
boost::signalslib::signal< void(double simTime)> signal_postUpdate
Signal used to update systems. Connect functions to this signal that need to be called once per tick ...
Definition DtRenderer.h:135
virtual DtFontManagerInterface & fontManager()=0
Get the font manager.
virtual void cleanup()=0
virtual void setShadowState(bool enabled)=0
Set the shadow mode and settings.
Class to manage disconnection of boost connections on deletion.
Definition DtSignalConnectionManager.h:21
An abstract interface for managers of DtTickable objects.
Definition DtTickableManagerInterface.h:27
DtVirtualBaseClass()
Do nothing constructor.
Contains DtCreateSensorFieldOfViewCommand and DtCreateSensorFieldOfViewCommandCreator class declarati...
Definition DtGridLinesSettingsRecord.h:16
Contains DLL export macros.
#define DT_DLL_VRVCORE
Definition vrvCore.h:20