VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtBallisticDrawComponent.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2026 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
16 
17 #include <osg/ref_ptr>
18 
19 #include <string>
20 
21 namespace osg
22 {
23  class RenderInfo;
24  class State;
25  class StateSet;
26 }
27 
28 namespace makVrv
29 {
30  class DtDe;
31  class DtGlBuffer;
32  class DtIndirectShaderManager;
33  class DtBallisticRunTimeSettings;
34  class DtBallisticComputeComponent;
35 
38 
41 
43  template <>
44  inline const char* creatorTypeName<DtBallisticDrawComponent>(void) { return "DtBallisticDrawComponentCreator"; }
45 
46 
53  {
54  public:
56 
57  protected:
62 
63  public:
65  virtual ~DtBallisticDrawComponent();
66 
67  private:
69  DtBallisticDrawComponent() = delete;
70 
73 
75  DtBallisticDrawComponent& operator=(const DtBallisticDrawComponent& rhs) = delete;
76 
77  public:
82  virtual void initialize();
83 
85  virtual void update(osg::RenderInfo& renderInfo);
86 
88  virtual void apply(osg::RenderInfo& renderInfo);
89 
97  virtual void drawBullets(DtGlBuffer* visibleSSBO, DtGlBuffer* indirectDrawSSBO);
98 
105  virtual void drawDebug(osg::RenderInfo& renderInfo, DtGlBuffer* visibleSSBO, DtGlBuffer* indirectDrawSSBO, int debugMode);
106 
108  virtual void releaseGLObjects(osg::State* state);
109 
111  virtual bool shouldDraw(bool isShadowPass);
112 
118  void unbindCullBuffers();
119 
125  void unbindDrawBuffers();
126 
128  virtual void slot_reloadShaders();
129 
133  void setComputeComponent(DtBallisticComputeComponent* computeComponent);
134 
135  protected:
138 
141 
144 
147 
150 
159 
162 
165 
168 
171  };
172 }
This manages the draw components (shader vp wrappers) for combinations of DtIndirectEffectTexturesTem...
Definition: DtIndirectShaderManager.h:50
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtBallisticComputeComponent * myComputeComponent
Compute component providing the BallisticCameraUbo for binding at draw time.
Definition: DtBallisticDrawComponent.h:170
const char * creatorTypeName< DtBallisticDrawComponent >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtBallisticDrawComponent.h:44
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:18
int myMeshIndexCount
Number of indices in the element buffer.
Definition: DtBallisticDrawComponent.h:158
DtSignalConnectionManager myConnections
Manages signal connections for shader reload notifications.
Definition: DtBallisticDrawComponent.h:140
DtDe & myDe
Reference to the simulation environment.
Definition: DtBallisticDrawComponent.h:137
GLuint myMeshEbo
Element index buffer for the bullet mesh.
Definition: DtBallisticDrawComponent.h:156
friend DtBallisticDrawComponentCreator
Definition: DtBallisticDrawComponent.h:55
GLuint myMeshVbo
Interleaved position and normal VBO for the bullet mesh.
Definition: DtBallisticDrawComponent.h:154
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
bool myDebugVPInitialized
True after the debug VirtualProgram has been installed on myDebugStateSet.
Definition: DtBallisticDrawComponent.h:167
Interface for the ballistic rendering draw pass.
Definition: DtBallisticDrawComponent.h:52
Interface for GPU compute operations driving the ballistic simulation pipeline.
Definition: DtBallisticComputeComponent.h:71
A generic OpenGL buffer. This can be: -&gt; a vertex buffer -&gt; an index buffer -&gt; a shader storage buffe...
Definition: DtGlBuffer.h:29
GLuint myMeshVao
OpenGL VAO for the bullet mesh.
Definition: DtBallisticDrawComponent.h:152
const DtBallisticRunTimeSettings & myBallisticRunTimeSettings
Reference to the shared ballistic runtime settings.
Definition: DtBallisticDrawComponent.h:143
Base class to provide boost signal/slot management.
Singleton holding runtime-tweakable settings for the ballistic system.
Definition: DtBallisticRunTimeSettings.h:43
Contains DLL export macros.
osg::ref_ptr< osg::StateSet > myStateSet
OSG state set carrying the render VirtualProgram.
Definition: DtBallisticDrawComponent.h:146
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
DtVirtualBaseClassCreator< DtBallisticDrawComponent > DtBallisticDrawComponentCreator
creator
Definition: DtBallisticDrawComponent.h:37
bool myVPInitialized
True after the render VirtualProgram has been installed on myStateSet.
Definition: DtBallisticDrawComponent.h:161
DtIndirectShaderManager & myIndirectShaderManager
Reference to the indirect shader manager used to load shaders.
Definition: DtBallisticDrawComponent.h:149
osg::ref_ptr< osg::StateSet > myDebugStateSet
OSG state set carrying the debug VirtualProgram.
Definition: DtBallisticDrawComponent.h:164

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)