VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtShaderEffectManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
16 
18 
19 #include <string>
20 
21 #include <osg/ref_ptr>
22 #include <osg/Vec3d>
23 #include <osg/Matrixd>
24 #include <osg/OperationThread>
25 #include <osg/Object>
26 #include <osg/State>
27 #include <osg/RenderInfo>
28 
29 namespace makVrv
30 {
31  class DtOsgWeatherEffectsObject;
32  class DtShaderEffect;
33  class DtOsgChannel;
34 
40  {
41  public:
42 
45  {
46  public:
47  osg::Vec3d myLocalPostion;
49  };
50 
51  // Inner class for passing the current render info from the main thread.
52  // Calls findTextureAddresses in order to setup the texture addresses as they are
53  // made resident
54  class TextureAddressJob : public osg::Operation
55  {
56  public:
59  virtual ~TextureAddressJob();
60 
62  virtual void operator () (osg::Object* sv);
63 
65  virtual void release();
66 
67  protected:
69 
70  };
71 
72  public:
74  virtual ~DtShaderEffectManager();
75 
76  protected:
79 
80  private:
85 
86 
89 
90  public:
93  virtual void initializeEffects();
94 
96  virtual void findTextureAddresses(osg::RenderInfo& renderInfo);
97 
99  virtual TextureAddressJob* createTextureAddressJob();
100 
102  virtual void update();
103 
105  virtual void updateChannel(DtOsgChannel* channel, osg::Vec3d pos);
106 
108  virtual void registerWeatherEffectsObject(DtOsgWeatherEffectsObject* weatherEffectsObject);
109 
111  virtual void slot_reloadShader();
112 
114  virtual DtOsgWeatherEffectsObject* findWeatherEffectsObject();
115 
117  virtual const DtOsgWeatherEffectsObject* findWeatherEffectsObject() const;
118 
120  virtual void releaseGLObjects(osg::State* state);
121 
123  void addShaderEffect(DtShaderEffect& shaderEffect);
124 
125  public:
127  static DtShaderEffectManager& instance(DtDe& de);
128 
130  static const std::string& theClassName();
131 
132  protected:
133 
135  virtual void updateImGui();
136 
138  virtual void updateUniforms();
139 
140 
141  protected:
142 
144 
146 
148 
150 
151  typedef std::map<DtOsgChannel*, DtShaderEffectPerChannelData> PerChannelDataMap;
153 
156 
158 
159  typedef std::set<DtShaderEffect*> ShaderEffectsSet;
161 
163 
164  };
165 }
osg::ref_ptr< osg::CoordinateSystemNode > CoordinateSystemNodeRef
Definition: DtShaderEffectManager.h:154
DtOsgWeatherEffectsObject * myWeatherEffectsObject
Definition: DtShaderEffectManager.h:157
The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneG...
Definition: DtOsgRenderer.h:125
Virtual base class.
Definition: DtVirtualBaseClass.h:22
DtShaderEffect injects custom shaders into the scenes, There are derrived classes of this for snow an...
Definition: DtShaderEffect.h:34
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Definition: featureContext.h:37
Contains the DtIndirectTextureProcessor class declaration.
DtShaderEffectManager injects custom shaders into the scenes, uses DtShaderEffect objects to add rend...
Definition: DtShaderEffectManager.h:39
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:75
osg::Vec3d myLocalPostion
Definition: DtShaderEffectManager.h:47
std::set< DtShaderEffect * > ShaderEffectsSet
Definition: DtShaderEffectManager.h:159
osg::ref_ptr< DtIndirectTextureProcessor > myTextureProcessor
Definition: DtShaderEffectManager.h:147
Contains makVrv::DtVirtualBaseClass class.
DtDe & myDe
Definition: DtShaderEffectManager.h:143
std::map< DtOsgChannel *, DtShaderEffectPerChannelData > PerChannelDataMap
Definition: DtShaderEffectManager.h:151
CoordinateSystemNodeRef myCoordSystemNode
Definition: DtShaderEffectManager.h:155
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
osg::ref_ptr< TextureAddressJob > myTextureAddressJob
Definition: DtShaderEffectManager.h:162
Structure for holding per channel data for the effects.
Definition: DtShaderEffectManager.h:44
DtShaderEffectManager & myShaderEffectManager
Definition: DtShaderEffectManager.h:68
ShaderEffectsSet myShaderEffects
Definition: DtShaderEffectManager.h:160
osg::Matrixd myLocalMatrixTranformInverse
Definition: DtShaderEffectManager.h:48
Base class to provide boost signal/slot management.
DtSignalConnectionManager myConnections
Definition: DtShaderEffectManager.h:145
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtOsgRenderer & myOsgRenderer
Definition: DtShaderEffectManager.h:149
PerChannelDataMap myPerChannelDataMap
Definition: DtShaderEffectManager.h:152
An OSG implementation of the weather effects object.
Definition: DtOsgWeatherEffectsObject.h:22
Definition: DtShaderEffectManager.h:54

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)