VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectVaoManager.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2022 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
16 
18 
19 #include <unordered_map>
20 
21 namespace makVrv
22 {
23  class DtDe;
24  class DtOsgToGlContextTracker;
25  class DtIndirectLog;
26 
35  {
36  public:
38  static DtIndirectVaoManager& instance(DtDe& de);
39 
41  virtual ~DtIndirectVaoManager();
42  protected:
45 
46  private:
48  DtIndirectVaoManager() = delete;
53  public:
54 
60  virtual unsigned int vao(bool rerecord);
61 
62  protected:
64  virtual void recordVAO(unsigned int vao);
65 
68  virtual void slot_contextAboutToBeDestroyed(const void* glContext);
69 
71  virtual void deleteVao(const void* glContext);
72 
73  protected:
75 
78 
79  std::unordered_map<const void*, DtGlVaoAndContext> myGlContextToVao;
80 
82 
84  };
85 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
virtual unsigned int vao(bool rerecord)
method to create and &#39;record&#39; a vertex array object (VAO) using VAO enables us to combine multiple bu...
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
virtual void deleteVao(const void *glContext)
internal
DtIndirectLog & myIndirectLog
Definition: DtIndirectVaoManager.h:83
Encapsulates an opengl object and the context it was created in.
virtual ~DtIndirectVaoManager()
dtor
Contains makVrv::DtVirtualBaseClass class.
DtIndirectVaoManager & operator=(const DtIndirectVaoManager &)=delete
not allowed
DtIndirectVaoManager()=delete
not allowed
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
std::unordered_map< const void *, DtGlVaoAndContext > myGlContextToVao
Definition: DtIndirectVaoManager.h:79
This class manages the vaos for indirect.
Definition: DtIndirectVaoManager.h:34
This class is specifically used by the indirect system It&#39;s separate so that it doesn&#39;t interfere wit...
Definition: DtIndirectLog.h:30
Base class to provide boost signal/slot management.
virtual void slot_contextAboutToBeDestroyed(const void *glContext)
slot for when a context is about to be destroyed This is used to delete the vao
virtual void recordVAO(unsigned int vao)
internal method to record a vao
DtOsgToGlContextTracker & myOsgToGlContextTracker
Definition: DtIndirectVaoManager.h:81
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:76
DtDe & myDe
Definition: DtIndirectVaoManager.h:74
DtSignalConnectionManager myConnections
for handling context destroyed event
Definition: DtIndirectVaoManager.h:77
static DtIndirectVaoManager & instance(DtDe &de)
Access the singleton instance.

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)