VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGpuArena.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 #include <vrvOsg/DtGpuOperation.h>
16 
17 #include <vrvCore/DtKeyedData.h>
18 
21 
22 #include <osg/StateAttribute>
23 #include <osg/OperationThread>
24 
25 #include <tbb/concurrent_queue.h>
26 
27 #include <vector>
28 
29 namespace osg
30 {
31  class StateSet;
32  class Camera;
33  class RenderInfo;
34  class NodeVisitor;
35 }
36 
37 namespace makVrv
38 {
40  class DtGpuArena;
41 
42  class DtGpuArenaUserData;
43  class DtThreadCameraStreamDataManager;
44  class DtIndirectGeometry;
45 
46  class DtOsgToGlContextTracker;
47  class DtIndirectGlTextureObjectManager;
48  class DtGlDeleteObjectManager;
49  class DtSkyObjectManager;
50 
51  class DtDe;
52 
55 
57  template <>
58  inline const char* creatorTypeName<DtGpuArena>(void) { return "DtGpuArenaCreator"; }
59 
60  // This is a top level PreDraw operation set up on the osgViewer.
61  // It allows you to setup/run operations that require a context (e.g. compute, transfer, drawing, etc)
62  class DT_DLL_VRVOSG DtGpuArena : public osg::Operation
63  {
64  public:
66 
68  virtual ~DtGpuArena();
69  protected:
71  DtGpuArena(DtDe& de);
72 
73  private:
75  DtGpuArena() = delete;
77  DtGpuArena& operator=(const DtGpuArena& rhs) = delete;
78 
80  DtGpuArena(const DtGpuArena& rhs) = delete;
81 
82  public:
86  virtual void operator () (osg::Object* obj) override;
87  public:
89  virtual void addOneTimeInitOp(DtIndirectGeometry* indirectGeometry);
90 
93  virtual void addPersistentOp(DtGpuOperation* op);
94 
97  virtual void removePersistentOp(DtGpuOperation* op);
98 
99  protected:
101  virtual void update(void);
102  protected:
104 
106 
107  const std::string myName;
108 
109  tbb::concurrent_queue< osg::observer_ptr<DtIndirectGeometry> > myOneTimeInitOps;
110 
111  std::list<DtGpuOperation*> myPersistentOperations;
112 
114 
116 
118 
120 
122  };
123 }
Manager for DtThreadCameraStreamData Holds them as cameras come in. Deletes them as cameras go out (v...
Definition: DtThreadCameraStreamDataManager.h:86
This class tracks gl contexts as they are created/destroyed per window creation/destruction. It is also what clients should hook to via signal_contextAboutToBeDestroyed for context destruction cleanup.
Definition: DtOsgToGlContextTracker.h:28
Encapsulate an operation that needs to happen on the gpu This can be anything (transfer, compute, drawing, etc) It is called from DtGpuArena/DtGpuArenaUserData.
Definition: DtGpuOperation.h:19
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
This manager manages the lifetime of the actual gl texture objects (gl unsigned ints) in the indirect...
Definition: DtIndirectGlTextureObjectManager.h:60
DtThreadCameraStreamDataManager & myTcsDataManager
Definition: DtGpuArena.h:105
Contains the DtGpuArenaUserData class declaration.
DtGpuArenaUserDataCreator & myGpuArenaUserDataCreator
Definition: DtGpuArena.h:121
Contains the DtGpuOperation class declaration.
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
tbb::concurrent_queue< osg::observer_ptr< DtIndirectGeometry > > myOneTimeInitOps
Definition: DtGpuArena.h:109
DtDe & myDe
Definition: DtGpuArena.h:103
\ ::, which allows us to hook into our indirect engine to render using indirect rendering...
Definition: DtIndirectGeometry.h:120
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtGlDeleteObjectManager & myGlDeleteObjectManager
Definition: DtGpuArena.h:119
Definition: DtGpuArena.h:62
std::list< DtGpuOperation * > myPersistentOperations
Definition: DtGpuArena.h:111
DtIndirectGlTextureObjectManager & myIndirectGlTextureObjectManager
Definition: DtGpuArena.h:117
Base class to provide boost signal/slot management.
Vaos are OpenGL context specific. They need to be deleted in the context they are created in...
Definition: DtGlDeleteObjectManager.h:58
const char * creatorTypeName< DtGpuArena >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtGpuArena.h:58
DtSignalConnectionManager myConnections
Definition: DtGpuArena.h:113
Contains DLL export macros.
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
friend DtGpuArenaCreator
Definition: DtGpuArena.h:65
DtVirtualBaseClassCreator< DtGpuArena > DtGpuArenaCreator
creator
Definition: DtGpuArena.h:51
const std::string myName
Definition: DtGpuArena.h:107
DtOsgToGlContextTracker & myOsgToGlContextTracker
Definition: DtGpuArena.h:115
Contains the DtKeyedData class declaration.

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)