VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSilverLiningContextManager.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>
14 
15 #include <unordered_map>
16 
17 namespace osg
18 {
19  class Camera;
20  class GraphicsContext;
21 }
22 namespace SilverLining
23 {
24  class Atmosphere;
25 }
26 
27 namespace makVrv
28 {
29  class DtWindow;
30 
31  class DtSilverliningGroup;
32 
35 
38 
40  template <>
41  inline const char* creatorTypeName<DtSilverLiningContextManager>(void) { return "DtSilverLiningContextManagerCreator"; }
42 
44  {
45  public:
48 
51  protected:
54 
55  private:
60 
61  public:
63  virtual void addGraphicsContextIfNecessary(const osg::Camera* osgCamera);
64 
66  virtual void windowToBeDestroyed(DtWindow* window, SilverLining::Atmosphere* atmosphere);
67  protected:
69  {
70  void* myOsContext;
71  const osg::Camera* myOsgCamera;
72  };
73 
74  typedef std::unordered_map<const osg::GraphicsContext*, OsContextAndCamera> ContextToHandleMap;
76 
78 
80  };
81 
82 }
DtSilverliningGroup & myParent
Definition: DtSilverLiningContextManager.h:79
Abstract Base class.
Definition: DtWindow.h:25
const char * creatorTypeName< DtSilverLiningContextManager >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtSilverLiningContextManager.h:41
Definition: DtSilverLiningContextManager.h:68
friend DtSilverLiningContextManagerCreator
only creator can create
Definition: DtSilverLiningContextManager.h:47
DtDe & myDe
Definition: DtSilverLiningContextManager.h:77
A group node which adds a silver-lining sky and will light all Children with the proper lighting para...
Definition: DtSilverliningGroup.h:82
DtSilverLiningContextManager & operator=(const DtSilverLiningContextManager &rhs)=delete
not allowed
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
DtSilverLiningContextManager(DtDe &de, DtSilverliningGroup &parent)
constructor
virtual ~DtSilverLiningContextManager()
destructor
std::unordered_map< const osg::GraphicsContext *, OsContextAndCamera > ContextToHandleMap
Definition: DtSilverLiningContextManager.h:74
DtVirtualBaseClassCreator< DtSilverLiningContextManager, DtSilverliningGroup & > DtSilverLiningContextManagerCreator
creator
Definition: DtSilverLiningContextManager.h:34
Definition: DtSilverLiningContextManager.h:43
void * myOsContext
Definition: DtSilverLiningContextManager.h:70
const osg::Camera * myOsgCamera
Definition: DtSilverLiningContextManager.h:71
virtual void addGraphicsContextIfNecessary(const osg::Camera *osgCamera)
add gc to track
virtual void windowToBeDestroyed(DtWindow *window, SilverLining::Atmosphere *atmosphere)
remove a gc being track and communicate that to sl
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:70
ContextToHandleMap myOsgGcToOsGc
Definition: DtSilverLiningContextManager.h:75

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)