VR-Forces 4.10 Class Documentation
 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 makVrv
30 {
31  class DtOsgWeatherEffectsObject;
32 
37  {
38  public:
39 
42  {
43  public:
46  GLuint64 myTextureAddress;
47  };
48 
49  typedef std::vector<DtShaderEffectTextureData> TextureDataPtrVector;
50 
51  public:
53  virtual ~DtShaderEffect();
54 
56  DtShaderEffect() = delete;
58  DtShaderEffect(const DtShaderEffect&) = delete;
60  DtShaderEffect &operator=(const DtShaderEffect&) = delete;
61 
62  protected:
64  DtShaderEffect(DtDe& de);
65 
66  public:
69  virtual void initializeEffect(const std::vector<osg::StateSet*>& statesets,
70  DtIndirectTextureProcessor* textureProcessor, DtOsgRenderer& osgRenderer);
71 
73  virtual void registerWeatherEffectsObject(DtOsgWeatherEffectsObject* weatherEffectsObject) = 0;
74 
76  virtual void updateTextureUniforms(unsigned int contextId);
77 
79  virtual void setCameraLocation(const DtVector& location);
80 
82  virtual void setEffectDirty(bool dirty);
83 
85  virtual bool effectDirty();
86 
88  virtual void updateImGui() = 0;
89 
91  virtual void updateUniforms() = 0;
92 
94  virtual void releaseGLObjects(osg::State* state);
95 
96  protected:
97 
99  virtual int loadShaderEffectTexture(const std::string& filename, const std::string& uniformName);
100 
102  virtual int addShaderEffectTexture(osg::Texture* shaderEffectTexture, const std::string& uniformName);
103 
104  protected:
105 
107 
109 
111 
112  };
113 }
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:90
Virtual base class.
Definition: DtVirtualBaseClass.h:19
DtShaderEffect injects custom shaders into the scenes, There are derrived classes of this for snow an...
Definition: DtShaderEffect.h:36
Structure for holding per texture data for bindless textures.
Definition: DtShaderEffect.h:41
TextureDataPtrVector myShaderEffectTextures
Definition: DtShaderEffect.h:108
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains the DtIndirectTextureProcessor class declaration.
DtDe & myDe
Definition: DtShaderEffect.h:106
bool myEffectDirty
Definition: DtShaderEffect.h:110
Contains makVrv::DtVirtualBaseClass class.
osg::ref_ptr< osg::Uniform > myUniform
Definition: DtShaderEffect.h:45
osg::ref_ptr< osg::Texture > myTexture
Definition: DtShaderEffect.h:44
Contains makVrv::DtShaderEffectManager class.
Definition: DtIndirectTextureProcessor.h:40
Base class to provide boost signal/slot management.
GLuint64 myTextureAddress
Definition: DtShaderEffect.h:46
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
std::vector< DtShaderEffectTextureData > TextureDataPtrVector
Definition: DtShaderEffect.h:49
An OSG implementation of the weather effects object.
Definition: DtOsgWeatherEffectsObject.h:22

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)