VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectCullPass.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2019 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
17 
18 #include <map>
19 
20 namespace osg
21 {
22  class State;
23  class FrameStamp;
24 }
25 
26 namespace makVrv
27 {
28  class DtGpuCullingAndLod;
29  class DtIndirectViewParameters;
30  class DtIndirectRenderingParameters;
31  class DtGlCaps;
32 
36  {
37  protected:
40 
41  //friend class so that it
43 
44  public:
45  //Destructor
46  virtual ~DtIndirectCullPass();
47 
48  private:
54  DtIndirectCullPass &operator=(const DtIndirectCullPass &other);
55 
56  public:
57 
59  virtual void deleteShaders(bool viaDestructor) const;
61  virtual void releaseGLObjects(osg::State* state) const;
62 
64  virtual void initializeIfNecessary(const DtGpuCullingAndLod& gpuCullingAndLod);
65 
67  virtual void execute(const DtGpuCullingAndLod& gpuCullingAndLod
68  , const DtIndirectViewParameters& viewParameters
69  , const DtIndirectRenderingParameters& irParams
70  , osg::FrameStamp* frameStamp);
71 
72  protected:
74  struct CullShaders {
76  CullShaders() :myCullShader(-1), myCullProgram(-1), myRefcount(0) { ; }
78  CullShaders(unsigned int shader, unsigned int program) : myCullShader(shader), myCullProgram(program), myRefcount(0){ ; }
79 
80  unsigned int myCullShader;
81  unsigned int myCullProgram;
83  };
84 
85  //mutable since they represent openGL objects which need to be cleaned up in constant functions.
86  // not private since they may need to be used by derived classes.
90  mutable double myStartTime;
91  unsigned int myLastTimeFrame;
92 
100 
101 
102 
104 
106 
107  protected:
108  static const bool theDebugInstancesAppended;
109  static std::map<std::string, CullShaders *> theShaderCache;
110 
111  };
112 
115  {
116  public:
119 
121  virtual ~DtIndirectCullPassCreator();
122 
124  virtual DtIndirectCullPass* create() const;
125 
128  static DtIndirectCullPassCreator& instance(DtDe& de);
129 
131  static const std::string& theClassName();
132  protected:
134  };
135 
136 
137 }
handles the running of the compute shader pass for indirect culling, LODing and switches ...
Definition: DtIndirectCullPass.h:35
int myMaxNumInstancesIndex
Definition: DtIndirectCullPass.h:93
DtVector3< int > myWorkGroupLocalSize
Definition: DtIndirectCullPass.h:103
int myProjectionMatrixIndex
Definition: DtIndirectCullPass.h:95
Virtual base class.
Definition: DtVirtualBaseClass.h:22
int myZoomMagnificationIndex
Definition: DtIndirectCullPass.h:96
double myStartTime
Definition: DtIndirectCullPass.h:90
GLuint myMutableCullShader
Definition: DtIndirectCullPass.h:88
int myModelViewMatrixIndex
Definition: DtIndirectCullPass.h:94
static const bool theDebugInstancesAppended
Definition: DtIndirectCullPass.h:108
struct used to cache the cull shaders and programs so they are not created by every instance of DtInd...
Definition: DtIndirectCullPass.h:74
unsigned int myCullShader
Definition: DtIndirectCullPass.h:80
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
GLuint myMutableCullProgram
Definition: DtIndirectCullPass.h:87
int myRefcount
Definition: DtIndirectCullPass.h:82
CullShaders()
default constructor
Definition: DtIndirectCullPass.h:76
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:17
unsigned int myLastTimeFrame
Definition: DtIndirectCullPass.h:91
static std::map< std::string, CullShaders * > theShaderCache
Definition: DtIndirectCullPass.h:109
3 dimensional vector
int myFadeParametersIndex
Definition: DtIndirectCullPass.h:99
Contains makVrv::DtVirtualBaseClass class.
int myViewPortIndex
Definition: DtIndirectCullPass.h:97
Class per frame that must be passed to the DtICullingAndLOD It indicates what would have changed (ins...
Definition: DtGpuCullingAndLodDefines.h:94
int myDistScaleIndex
Definition: DtIndirectCullPass.h:98
The class that is used to communicate the camera viewing parameters to the DtICullingAndLOD interface...
Definition: DtGpuCullingAndLodDefines.h:38
DtDe & myDe
Definition: DtIndirectCullPass.h:105
unsigned int myCullProgram
Definition: DtIndirectCullPass.h:81
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtDe & myDe
Definition: DtIndirectCullPass.h:133
CullShaders * myMutableShaderStruct
Definition: DtIndirectCullPass.h:89
creator for DtIndirectCullPass
Definition: DtIndirectCullPass.h:114
CullShaders(unsigned int shader, unsigned int program)
initializer constructor
Definition: DtIndirectCullPass.h:78
This class is a component of the DtIndirectGeometry It inputs are: -&gt; the instances registered with Dt...
Definition: DtGpuCullingAndLod.h:50

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)