16 #include <boost/thread/mutex.hpp>
18 #include <unordered_set>
19 #include <unordered_map>
24 class DtOsgToGlContextTracker;
26 class DtGlBufferMemoryTracker;
86 virtual void run(
unsigned int frameNumber);
96 virtual void addBufferHandleToDelete(
unsigned int bufferId,
bool isMapped =
false);
99 virtual void addProgramToDelete(
unsigned int programId);
102 virtual void addGlResourceToDelete(
DtGlObject* resource);
106 virtual void slot_contextAboutToBeDestroyed(
const void* glContext);
109 virtual void deleteObjects(
const void* glContext);
112 virtual void deleteObjects(
const void* glContext, std::unordered_map<
const void*, std::unordered_set<unsigned int> >& map, ObjectType type);
115 virtual void deleteDtGlObjects(
const void* glContext);
118 virtual void addObject(std::unordered_map<
const void*, std::unordered_set<unsigned int> >& map,
const DtGlObjectAndContext& objectAndContext, ObjectType type);
121 virtual void deleteBuffers(
void);
124 virtual void deletePrograms(
void);
127 virtual void checkMapOnShutdown(std::unordered_map<
const void*, std::unordered_set<unsigned int> >& map, ObjectType type);
139 std::unordered_map<const void*, std::unordered_set<unsigned int> >
myVaosToDelete;
141 std::unordered_map<const void*, std::unordered_set<unsigned int> >
myFbosToDelete;
std::unordered_map< const void *, std::unordered_set< unsigned int > > myFbosToDelete
Definition: DtGlDeleteObjectManager.h:141
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
DtIndirectLog & myIndirectLog
Definition: DtGlDeleteObjectManager.h:132
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
A Generic object that needs clean up in the right context (the one it was created in) This can be use...
Definition: DtGlObjects.h:30
std::unordered_map< const void *, std::unordered_set< DtGlObject * > > myDtGlObjectsToDelete
Definition: DtGlDeleteObjectManager.h:143
std::tuple< unsigned int, const void * > DtGlVaoAndContext
a vao and the context it was created in
Definition: DtGlObjects.h:22
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
std::tuple< unsigned int, const void * > DtGlObjectAndContext
an OpenGL object and the context it was created in
Definition: DtGlObjects.h:25
DtDe & myDe
Definition: DtGlDeleteObjectManager.h:134
std::unordered_set< unsigned int > myProgramIdsToDelete
Definition: DtGlDeleteObjectManager.h:149
std::tuple< unsigned int, const void * > DtGlFboAndContext
an fbo and the context it was created in
Definition: DtGlObjects.h:19
Encapsulates an opengl object and the context it was created in.
std::unordered_set< unsigned int > myGlBuffersToUnmap
Definition: DtGlDeleteObjectManager.h:147
Contains makVrv::DtVirtualBaseClass class.
boost::mutex myMutex
Definition: DtGlDeleteObjectManager.h:151
This class is used to track buffers' memory as they are created/deleted.
Definition: DtGlBufferMemoryTracker.h:80
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
ObjectType
Definition: DtGlDeleteObjectManager.h:61
std::unordered_set< unsigned int > myGlBuffersToDelete
list of handles to delete and potentially unmap if mapped
Definition: DtGlDeleteObjectManager.h:146
DtOsgToGlContextTracker & myOsgToGlContextTracker
Definition: DtGlDeleteObjectManager.h:130
DtSignalConnectionManager myConnections
for handling context destroyed event
Definition: DtGlDeleteObjectManager.h:137
This class is specifically used by the indirect system It's separate so that it doesn't interfere wit...
Definition: DtIndirectLog.h:30
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
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
std::unordered_map< const void *, std::unordered_set< unsigned int > > myVaosToDelete
Definition: DtGlDeleteObjectManager.h:139