VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectGeometryStateManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
14 
15 #include <tbb/concurrent_unordered_map.h>
16 #include <tbb/concurrent_unordered_set.h>
17 #include <tbb/atomic.h>
18 
19 namespace osg
20 {
21  class State;
22 }
23 
24 namespace makVrv
25 {
26  class DtDe;
27 
32  {
33  public:
36 
39 
40  private:
44  DtIndirectGeometryStateManager &operator=(const DtIndirectGeometryStateManager &other) = delete;
45 
46  public:
48  virtual int stateId(const DtIndirectOpenGLState& state);
49 
51  virtual bool applyState(int stateId);
52 
54  virtual void restoreAllModes(osg::State &state);
55 
58  virtual void setStateCaching(bool val);
59 
62  virtual bool stateCaching(void) const;
63 
65  virtual GLenum primitiveType(int stateId) const;
66 
68  virtual bool depthOnly(int stateId) const;
69 
70 
71  protected:
72  typedef tbb::concurrent_unordered_map<DtIndirectOpenGLState, int, DtIndirectOpenGLStateHasher> MapStateToId;
74 
75  typedef tbb::concurrent_unordered_map<int, DtIndirectOpenGLState> MapIdToState;
77 
78  typedef tbb::concurrent_unordered_set<int> ConcurrentSetInts;
79 
82 
83  tbb::atomic<int> myNextStateId;
84 
86 
88 
90 
91  const bool myReverseZEnabled;
92  };
93 }
ConcurrentSetInts myUniqueAttributes
Definition: DtIndirectGeometryStateManager.h:81
DtDe & myDe
Definition: DtIndirectGeometryStateManager.h:87
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
non virtual Container class for holding on to the different states that are found for indirect geomet...
Definition: DtIndirectOpenGLState.h:25
MapStateToId myMapStateToId
Definition: DtIndirectGeometryStateManager.h:73
bool myStateCaching
Definition: DtIndirectGeometryStateManager.h:89
MapIdToState myMapIdToState
Definition: DtIndirectGeometryStateManager.h:76
tbb::concurrent_unordered_set< int > ConcurrentSetInts
Definition: DtIndirectGeometryStateManager.h:78
tbb::concurrent_unordered_map< DtIndirectOpenGLState, int, DtIndirectOpenGLStateHasher > MapStateToId
Definition: DtIndirectGeometryStateManager.h:72
Simple state/glmodes class for handling setting up modes It can now handle generic state modes and at...
Definition: DtIndirectGeometryStateManager.h:31
ConcurrentSetInts myUniqueModes
Definition: DtIndirectGeometryStateManager.h:80
tbb::concurrent_unordered_map< int, DtIndirectOpenGLState > MapIdToState
Definition: DtIndirectGeometryStateManager.h:75
const bool myReverseZEnabled
Definition: DtIndirectGeometryStateManager.h:91
unsigned int GLenum
Definition: DtGlTextureBufferObject.h:18
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
DtIndirectOpenGLState myLastAppliedState
Definition: DtIndirectGeometryStateManager.h:85
Contains the DtIndirectOpenGLState class declaration.
tbb::atomic< int > myNextStateId
Definition: DtIndirectGeometryStateManager.h:83

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)