VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectDebugCullComponent.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 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 <vrvMath/DtVector3.h>
19 
20 #include <vector>
21 
22 namespace osg
23 {
24  class RenderInfo;
25  class State;
26  class Camera;
27 }
28 namespace makVrv
29 {
30  class DtVirtualProgramCache;
31  class DtGpuCulling;
32  class DtIndirectDofManager;
33 
36 
39 
41  template <>
42  inline const char* creatorTypeName<DtIndirectDebugCullComponent>(void) { return "DtIndirectDebugCullComponentCreator"; }
43 
44  // class to manage the debug drawing (the AABBs of instances output from the cull shader)
46  {
47  public:
50 
53  protected:
56  private:
59 
62 
64  DtIndirectDebugCullComponent& operator=(const DtIndirectDebugCullComponent& rhs) = delete;
65 
66  public:
68  virtual void initialize(DtVirtualProgramCache& virtualProgramCache);
69 
71  virtual void reloadShaders(DtVirtualProgramCache& virtualProgramCache);
72 
74  virtual void apply(osg::RenderInfo& renderInfo) override;
75 
77  virtual void releaseGLObjects(osg::State* state) override;
78 
80  virtual void draw(osg::RenderInfo& renderInfo, int maxCommands
81  , DtGpuCulling* gpuCulling
82  , DtIndirectDofManager* dofManager
83  , const osg::Camera* camera
84  , DtGlBuffer* gpuShaderUbo
85  , int gpuShaderUboBinding);
86 
87  protected:
88  // initialize the debug geometry to draw the debug bounding boxes
89  virtual void initializeDebugGeometryIfNecessary(void);
90 
91  protected:
92  std::vector<Vector3_32> myDebugVertices;
93  std::vector<unsigned short> myDebugIndices;
94  unsigned int myDebugVertexBuffer;
95  unsigned int myDebugIndexBuffer;
96  };
97 
98 }
std::vector< unsigned short > myDebugIndices
Definition: DtIndirectDebugCullComponent.h:93
const char * creatorTypeName< DtIndirectDebugCullComponent >(void)
template specialization for the creator
Definition: DtIndirectDebugCullComponent.h:42
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Definition: DtIndirectDebugCullComponent.h:45
DtVirtualBaseClassCreator< DtIndirectDebugCullComponent > DtIndirectDebugCullComponentCreator
creator
Definition: DtIndirectDebugCullComponent.h:35
This class is a component of the DtIndirectGeometry It inputs are: -&gt; the instances registered with Dt...
Definition: DtGpuCulling.h:87
3 dimensional vector
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
class to hold a hashed map of strings to equivalent virtual programs to avoid repeated, duplicate creation of a virtual programs
Definition: DtVirtualProgramCache.h:39
Contains the DtIndirectDrawComponent class declaration.
handles the dof nodes for all the indirect geometry. Sets up the default state of osg::Dof...
Definition: DtIndirectDofManager.h:65
A generic OpenGL buffer. This can be: -&gt; a vertex buffer -&gt; an index buffer -&gt; a shader storage buffe...
Definition: DtGlBuffer.h:29
std::vector< Vector3_32 > myDebugVertices
Definition: DtIndirectDebugCullComponent.h:92
unsigned int myDebugVertexBuffer
Definition: DtIndirectDebugCullComponent.h:94
Contains DLL export macros.
Interface class to manage/configure drawing of a subset of rendering components within an indirect ge...
Definition: DtIndirectDrawComponent.h:33
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:72
unsigned int myDebugIndexBuffer
Definition: DtIndirectDebugCullComponent.h:95
friend DtIndirectDebugCullComponentCreator
only creator can create
Definition: DtIndirectDebugCullComponent.h:49

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)