VR-Forces Developer's Guide
 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) 2022 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
16 #include <vrvMath/DtVector3.h>
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 DtIndirectRunTimeSettings;
37  class DtIndirectCullProgramConstants;
38  class DtIndirectCullProgramBufferAddresses;
39  class DtSkyObjectManager;
40  class DtCullShaderConfig;
41 
44 
47 
49  template <>
50  inline const char* creatorTypeName<DtIndirectCullProgram>(void) { return "DtIndirectCullProgramCreator"; }
51 
55  {
56  protected:
58  DtIndirectCullProgram(DtDe& de, const DtCullShaderConfig& cullShaderConfig);
59 
60  //friend class so that it
62 
63  public:
64  //Destructor
65  virtual ~DtIndirectCullProgram();
66 
68  DtIndirectCullProgram() = delete;
70  DtIndirectCullProgram(const DtIndirectCullProgram &other) = delete;
72  DtIndirectCullProgram &operator=(const DtIndirectCullProgram &other) = delete;
73 
74  public:
75 
77  virtual void incrementNumUsers();
78 
80  virtual void decrementNumUsers();
81 
83  virtual void execute(const DtIndirectViewParameters& viewParameters
84  , const DtGpuCulling& gpuCulling
85  , const osg::FrameStamp* frameStamp
86  , const int lightSourceStateId
87  , const int geometrySpecificationsBufferSize
88  , const uint64_t geomSpecIndexToCommandIndexAddress
89  , const uint64_t gpuPerGeomInstancesAddress
90  , const osg::Camera* camera);
91 
93  virtual void deleteShaders();
94 
95  protected:
97  virtual void initializeIfNecessary(void);
98 
99 
100  protected:
103 
106 
109 
112 
115 
116  mutable double myStartTime;
118 
120 
122 
124 
126 
128 
129  protected:
130  static const bool theDebugInstancesAppended;
131 
132  std::atomic<int> myNumUsers;
133 
134  static const bool myTrackObjects;
135 
138  {
139  public:
141  TotalCounter();
143  virtual ~TotalCounter();
144  public:
145  std::atomic<int> myCount;
146  };
148  };
149 }
DtDe & myDe
Definition: DtIndirectCullProgram.h:123
Contains the DtCullShaderConfig class declaration.
std::atomic< int > myNumUsers
Definition: DtIndirectCullProgram.h:132
const DtCullShaderConfig myCullShaderConfig
Definition: DtIndirectCullProgram.h:119
Helper class to manage program constants of the cull program.
Definition: DtIndirectCullProgramConstants.h:17
int myGpuShaderUboBinding
buffer binding for the UBO of the cull program
Definition: DtIndirectCullProgram.h:111
#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:88
friend DtIndirectCullProgramCreator
Definition: DtIndirectCullProgram.h:61
DtVector3< int > myWorkGroupLocalSize
Definition: DtIndirectCullProgram.h:121
Definition: DtSkyObjectManager.h:30
Represents setting that are runtime tweakable/toggleable.
Definition: DtIndirectRunTimeSettings.h:24
A convenience class to represent an OpenGL Shader Program.
Definition: DtGlProgram.h:66
shader configuration storage class. Has 3 available options which are described in the constructor&#39;s ...
Definition: DtCullShaderConfig.h:21
const DtIndirectRunTimeSettings & myIndirectRunTimeSettings
Definition: DtIndirectCullProgram.h:125
3 dimensional vector
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
const char * creatorTypeName< DtIndirectCullProgram >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectCullProgram.h:50
static const bool myTrackObjects
Definition: DtIndirectCullProgram.h:134
handles the running of the compute shader pass for indirect culling, LODing and switches ...
Definition: DtIndirectCullProgram.h:54
std::atomic< int > myCount
Definition: DtIndirectCullProgram.h:145
static const bool theDebugInstancesAppended
Definition: DtIndirectCullProgram.h:130
double myStartTime
Definition: DtIndirectCullProgram.h:116
DtGlBuffer * myGpuShaderUbo
buffer for the UBO of the cull program
Definition: DtIndirectCullProgram.h:108
DtIndirectCullProgramConstants * myProgramConstants
the constants associated with the cull program
Definition: DtIndirectCullProgram.h:105
A generic OpenGL buffer. This can be: -&gt; a vertex buffer -&gt; an index buffer -&gt; a shader storage buffe...
Definition: DtGlBuffer.h:29
The class that is used to communicate the camera viewing parameters to the DtICullingAndLOD interface...
Definition: DtIndirectViewParameters.h:26
float myLastTimeFrame
Definition: DtIndirectCullProgram.h:117
Contains DLL export macros.
bool myMutableShadersFailedToCompile
indicate whether we have failed to compile
Definition: DtIndirectCullProgram.h:114
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:76
DtGlProgram * myCullProgram
The program.
Definition: DtIndirectCullProgram.h:102
DtVirtualBaseClassCreator< DtIndirectCullProgram, const DtCullShaderConfig & > DtIndirectCullProgramCreator
creator
Definition: DtIndirectCullProgram.h:43
structure to count total number of DtIndirectGeometrys in the system
Definition: DtIndirectCullProgram.h:137
static TotalCounter theTotalCounter
Definition: DtIndirectCullProgram.h:147
DtSkyObjectManager & mySkyObjectManager
Definition: DtIndirectCullProgram.h:127

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)