VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtShaderEffect.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
16 
19 
20 #include <matrix/vlVector.h>
21 
22 #include <string>
23 #include <vector>
24 
25 #include <osg/Texture>
26 #include <osg/Uniform>
27 #include <osg/ref_ptr>
28 
29 namespace osg
30 {
31  class GraphicsContext;
32 }
33 
34 namespace makVrv
35 {
36  class DtOsgWeatherEffectsObject;
37  class DtIndirectTextureProcessor;
38 
43  {
44  public:
45 
48  {
49  public:
52  GLuint64 myTextureAddress;
53  };
54 
55  typedef std::vector<DtShaderEffectTextureData> TextureDataPtrVector;
56 
57  public:
59  virtual ~DtShaderEffect();
60 
62  DtShaderEffect() = delete;
64  DtShaderEffect(const DtShaderEffect&) = delete;
66  DtShaderEffect &operator=(const DtShaderEffect&) = delete;
67 
68  protected:
70  DtShaderEffect(DtDe& de);
71 
72  public:
75  virtual void initializeEffect(const std::vector<osg::StateSet*>& statesets,
76  DtIndirectTextureProcessor* textureProcessor, DtOsgRenderer& osgRenderer);
77 
79  virtual void registerWeatherEffectsObject(DtOsgWeatherEffectsObject* weatherEffectsObject) = 0;
80 
82  virtual void updateTextureUniforms(const osg::GraphicsContext* graphicsContext);
83 
85  virtual void setCameraLocation(const DtVector& location);
86 
89  virtual void setWindSpeed(float speed);
90 
93  virtual void setWindDirection(float direction);
94 
96  virtual void setEffectDirty(bool dirty);
97 
99  virtual bool effectDirty();
100 
102  virtual void updateImGui() = 0;
103 
105  virtual void updateUniforms() = 0;
106 
108  virtual void releaseGLObjects(osg::State* state);
109 
110  protected:
111 
113  virtual int loadShaderEffectTexture(const std::string& filename, const std::string& uniformName);
114 
116  virtual int addShaderEffectTexture(osg::Texture* shaderEffectTexture, const std::string& uniformName);
117 
118  protected:
119 
121 
123 
125 
127 
128  };
129 }
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneG...
Definition: DtOsgRenderer.h:87
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
DtShaderEffect injects custom shaders into the scenes, There are derrived classes of this for snow an...
Definition: DtShaderEffect.h:42
Structure for holding per texture data for bindless textures.
Definition: DtShaderEffect.h:47
TextureDataPtrVector myShaderEffectTextures
Definition: DtShaderEffect.h:122
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains the DtIndirectTextureProcessor class declaration.
DtDe & myDe
Definition: DtShaderEffect.h:120
bool myEffectDirty
Definition: DtShaderEffect.h:126
Contains makVrv::DtVirtualBaseClass class.
osg::ref_ptr< osg::Uniform > myUniform
Definition: DtShaderEffect.h:51
osg::ref_ptr< osg::Texture > myTexture
Definition: DtShaderEffect.h:50
Contains makVrv::DtShaderEffectManager class.
Definition: DtIndirectTextureProcessor.h:42
Base class to provide boost signal/slot management.
GLuint64 myTextureAddress
Definition: DtShaderEffect.h:52
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
std::vector< DtShaderEffectTextureData > TextureDataPtrVector
Definition: DtShaderEffect.h:55
An OSG implementation of the weather effects object.
Definition: DtOsgWeatherEffectsObject.h:22
DtIndirectTextureProcessor * myTextureProcessor
Definition: DtShaderEffect.h:124

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)