VR-Forces 4.10 Class Documentation
 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) 2020 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
16 #include <osg/observer_ptr>
17 
18 namespace osg
19 {
20  class State;
21  class Camera;
22 }
23 
24 namespace makVrv
25 {
26  class DtDe;
27  class DtIndirectGeometry;
28  class DtGlVaoManager;
29 
32 
35 
37  template <>
38  inline const char* creatorTypeName<DtIndirectVaoManager>(void) { return "DtIndirectVaoManagerCreator"; }
39 
43  {
44  public:
47 
49  virtual ~DtIndirectVaoManager();
50  protected:
53 
54  private:
59  public:
63  virtual void initialize(const DtIndirectGeometry* indirectGeometry);
64 
68  virtual unsigned int getOrCreateAndRecordVAO(osg::State* state, const osg::Camera* camera);
69 
71  virtual void clearVAO(void);
72 
74  virtual void releaseGLObjects(osg::State* state);
75 
77  virtual void flushVaoManagers();
78 
79  protected:
81  virtual void recordVAO(unsigned int vao, const osg::Camera* camera);
82 
83  protected:
86 
87  // We need a gl manager per camera
88  typedef std::map<osg::observer_ptr<const osg::Camera>, DtGlVaoManager*> CameraToVaoManagerMap;
90  };
91 }
const DtIndirectGeometry * myIndirectGeometry
Definition: DtIndirectVaoManager.h:85
virtual void recordVAO(unsigned int vao, const osg::Camera *camera)
internal method to record a vao
virtual void releaseGLObjects(osg::State *state)
release gl objects
virtual void clearVAO(void)
clear all the internal vaos
friend DtIndirectVaoManagerCreator
only creator can create
Definition: DtIndirectVaoManager.h:46
virtual ~DtIndirectVaoManager()
dtor
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
virtual unsigned int getOrCreateAndRecordVAO(osg::State *state, const osg::Camera *camera)
method to create and &#39;record&#39; a vertex array object (VAO) using VAO enables us to combine multiple bu...
\ ::, which allows us to hook into our indirect engine to render using indirect rendering...
Definition: DtIndirectGeometry.h:102
DtVirtualBaseClassCreator< DtIndirectVaoManager > DtIndirectVaoManagerCreator
creator
Definition: DtIndirectVaoManager.h:31
DtIndirectVaoManager & operator=(const DtIndirectVaoManager &)=delete
not allowed
&#39;super&#39; class for managing the per camera vaos for an indirect geometry internally uses a DtGlVaoMana...
Definition: DtIndirectVaoManager.h:42
DtIndirectVaoManager(DtDe &de)
only creator can create
This class is used to manage an opengl vertex array object (VAO) dealing with multiple opengl context...
Definition: DtGlVaoManager.h:49
virtual void initialize(const DtIndirectGeometry *indirectGeometry)
set the geo for which this manager works on it needs to access the gpu culling and the registrar ther...
std::map< osg::observer_ptr< const osg::Camera >, DtGlVaoManager * > CameraToVaoManagerMap
Definition: DtIndirectVaoManager.h:88
const char * creatorTypeName< DtIndirectVaoManager >(void)
template specialization for the creator
Definition: DtIndirectVaoManager.h:38
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
CameraToVaoManagerMap myMutableVaoManagers
Definition: DtIndirectVaoManager.h:89
DtDe & myDe
Definition: DtIndirectVaoManager.h:84
virtual void flushVaoManagers()
Check for VaoManagers associated with cameras that are no longer valid and remove them...

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)