VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectCullProgram.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
17 
19 
20 #include <map>
21 
22 namespace osg
23 {
24  class State;
25  class FrameStamp;
26  class Camera;
27 }
28 
29 namespace makVrv
30 {
31  class DtGpuCulling;
32  class DtIndirectViewParameters;
33  class DtGlCaps;
34  class DtGlBuffer;
35  class DtGlProgram;
36  class DtTerrainPatchObjectManager;
37  class DtIndirectCullProgramConstants;
38  class DtIndirectCullProgramBufferAddresses;
39  class DtSkyObjectManager;
40 
44  {
45  protected:
48 
49  //friend class so that it
51 
52  public:
53  //Destructor
54  virtual ~DtIndirectCullProgram();
55 
56  private:
62  DtIndirectCullProgram &operator=(const DtIndirectCullProgram &other);
63 
64  public:
65 
67  virtual void deleteShaders(bool viaDestructor, bool viaReload) const;
68 
70  virtual void clearCullProgram(bool viaDestructor) const;
71 
73  virtual void releaseGLObjects(osg::State* state) const;
74 
76  virtual void initializeIfNecessary(const DtCullShaderConfig& cullShaderConfig);
77 
79  virtual void execute(const DtIndirectViewParameters& viewParameters
80  , const DtGpuCulling& gpuCulling
81  , const osg::FrameStamp* frameStamp
82  , const int lightSourceStateId
83  , const int geometrySpecificationsBufferSize
84  , const GLuint64 geomSpecIndexToCommandIndexAddress
85  , const GLuint64 gpuPerGeomInstancesAddress
86  , const osg::Camera* camera);
87 
88  protected:
91  {
93  ReferencedCullProgram(DtGlProgram* program) : myCullProgram(program), myRefcount(0){ ; }
94 
97  };
98 
100  // not private since they may need to be used by derived classes.
102 
105 
108 
111 
114 
115  mutable double myStartTime;
117 
119 
121 
123 
125 
127 
128  protected:
129  static const bool theDebugInstancesAppended;
130  static std::map<std::string, ReferencedCullProgram *> theShaderCache;
131  };
132 
135  {
136  public:
139 
141  virtual ~DtIndirectCullPassCreator();
142 
144  virtual DtIndirectCullProgram* create() const;
145 
148  static DtIndirectCullPassCreator& instance(DtDe& de);
149 
151  static const std::string& theClassName();
152  protected:
154  };
155 }
DtDe & myDe
Definition: DtIndirectCullProgram.h:122
Contains the DtCullShaderConfig class declaration.
DtGlProgram * myCullProgram
Definition: DtIndirectCullProgram.h:95
Virtual base class.
Definition: DtVirtualBaseClass.h:19
Manager that provides direct access to the terrain patch objects in use in a display engine also hand...
Definition: DtTerrainPatchObjectManager.h:38
Helper class to manage program constants of the cull program.
Definition: DtIndirectCullProgramConstants.h:17
ReferencedCullProgram(DtGlProgram *program)
initializer constructor
Definition: DtIndirectCullProgram.h:93
int myGpuShaderUboBinding
buffer binding for the UBO of the cull program
Definition: DtIndirectCullProgram.h:110
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
This class is a component of the DtIndirectGeometry It inputs are: -&gt; the instances registered with Dt...
Definition: DtGpuCulling.h:64
DtVector3< int > myWorkGroupLocalSize
Definition: DtIndirectCullProgram.h:120
Definition: DtSkyObjectManager.h:23
const DtTerrainPatchObjectManager & myTerrainPatchObjectManager
Definition: DtIndirectCullProgram.h:124
static std::map< std::string, ReferencedCullProgram * > theShaderCache
Definition: DtIndirectCullProgram.h:130
A convenience class to represent an OpenGL Shader Program.
Definition: DtGlProgram.h:65
shader configuration storage class.
Definition: DtCullShaderConfig.h:19
3 dimensional vector
Contains makVrv::DtVirtualBaseClass class.
DtCullShaderConfig myCullShaderConfig
Definition: DtIndirectCullProgram.h:118
handles the running of the compute shader pass for indirect culling, LODing and switches ...
Definition: DtIndirectCullProgram.h:43
static const bool theDebugInstancesAppended
Definition: DtIndirectCullProgram.h:129
double myStartTime
Definition: DtIndirectCullProgram.h:115
DtGlBuffer * myGpuShaderUbo
buffer for the UBO of the cull program
Definition: DtIndirectCullProgram.h:107
struct used to cache the cull shaders and programs so they are not created by every instance of DtInd...
Definition: DtIndirectCullProgram.h:90
DtIndirectCullProgramConstants * myProgramConstants
the constants associated with the cull program
Definition: DtIndirectCullProgram.h:104
A generic OpenGL buffer.
Definition: DtGlBuffer.h:27
The class that is used to communicate the camera viewing parameters to the DtICullingAndLOD interface...
Definition: DtIndirectViewParameters.h:26
float myLastTimeFrame
Definition: DtIndirectCullProgram.h:116
Contains DLL export macros.
bool myMutableShadersFailedToCompile
indicate whether we have failed to compile
Definition: DtIndirectCullProgram.h:113
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtDe & myDe
Definition: DtIndirectCullProgram.h:153
int myRefcount
Definition: DtIndirectCullProgram.h:96
creator for DtIndirectCullPass
Definition: DtIndirectCullProgram.h:134
ReferencedCullProgram * myMutableReferencedCullProgram
mutable since they represent openGL objects which need to be cleaned up in constant functions...
Definition: DtIndirectCullProgram.h:101
DtSkyObjectManager & mySkyObjectManager
Definition: DtIndirectCullProgram.h:126

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)