VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgOverlayResourceProvider.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 #include <vrvOsg/vrvOsg.h>
12 
14 
16 
17 namespace osg
18 {
19  class State;
20 }
21 
22 namespace makVrv
23 {
24  class DtGlRenderTexture;
25  class DtOsgRenderer;
26  class DtTextureInterFace;
27 
30  {
31  public:
32 
35 
38 
41 
44  const DtOsgOverlayResourceProvider& other) = delete;
45 
48  const DtOsgOverlayResourceProvider&& other) = delete;
49 
52  const DtOsgOverlayResourceProvider& other) = delete;
53 
56  const DtOsgOverlayResourceProvider&& other) = delete;
57 
58  public:
59 
61  virtual void releaseResources();
62 
64  virtual void setState(osg::State* myState);
65 
67  virtual void setCurrentSceneDepthTextureId(unsigned int id);
68 
70  virtual unsigned int currentSceneDepthTextureId() const override;
71 
73  virtual void setCurrentSceneOcclusionTextureId(unsigned int id);
74 
76  virtual unsigned int currentSceneOcclusionTextureId() const override;
77 
78  // ! get the 1d texture object id
79  virtual unsigned int texture1DId(DtTextureInterface* textureInterface ) const override;
80 
81  // ! get the 2d texture object id
82  virtual unsigned int texture2DId(DtTextureInterface* textureInterface ) const override;
83 
87  virtual unsigned int getStippleTexture(const unsigned int stipplePattern[32]) override;
88 
89  protected:
90 
92  DtOsgOverlayResourceProvider(DtOsgRenderer& renderer, bool forceTextShaping);
93 
95  virtual unsigned int textureId(DtTextureInterface* textureInterface ) const;
96 
97  protected:
98 
99  osg::State* myState;
100 
101  unsigned int mySceneDepthTextureId;
103 
105  struct StippleKey
106  {
107  unsigned int key[32];
108  bool operator<(const StippleKey& b) const;
109  };
110 
111  typedef std::map<StippleKey, unsigned int> StippleTextureMap;
114  };
115 
116 
117 
120  {
121  public:
124 
127 
130  const DtOsgOverlayResourceProviderCreator& other) = delete;
131 
134  const DtOsgOverlayResourceProviderCreator&& other) = delete;
135 
138  const DtOsgOverlayResourceProviderCreator& other) = delete;
139 
142  const DtOsgOverlayResourceProviderCreator&& other) = delete;
143 
144  public:
146  virtual DtOsgOverlayResourceProvider* create(
147  DtOsgRenderer& renderer, bool forceTextShaping) const;
148 
150  static DtOsgOverlayResourceProviderCreator& instance(DtDe& de);
151 
153  static const std::string& theClassName();
154  };
155 }
Contains makVrv::DtOverlayResourceProvider class.
The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneG...
Definition: DtOsgRenderer.h:90
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
float myStippleMaxTextureAnisotropy
Definition: DtOsgOverlayResourceProvider.h:113
unsigned int mySceneDepthTextureId
Definition: DtOsgOverlayResourceProvider.h:101
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:24
The overlay resource provider class provides resources for overlay drawing classes.
Definition: DtOverlayResourceProvider.h:28
Contains makVrv::DtVirtualBaseClass class.
creator for DtOsgOverlayResourceProvider
Definition: DtOsgOverlayResourceProvider.h:119
std::map< StippleKey, unsigned int > StippleTextureMap
Definition: DtOsgOverlayResourceProvider.h:111
StippleTextureMap myStippleTextureMap
Definition: DtOsgOverlayResourceProvider.h:112
osg::State * myState
Definition: DtOsgOverlayResourceProvider.h:99
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
The Osg specific implementation of the overlay resource provider.
Definition: DtOsgOverlayResourceProvider.h:29
unsigned int mySceneOcclusionTextureId
Definition: DtOsgOverlayResourceProvider.h:102
This is a std::map key for a stipple pattern.
Definition: DtOsgOverlayResourceProvider.h:105

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)