VR-Forces 4.10 Class Documentation
 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 void setReverseZEnabled(bool val);
69 
71  virtual bool reverseZEnabled(void) const;
72 
73  protected:
74  typedef tbb::concurrent_unordered_map<DtIndirectOpenGLState, int, DtIndirectOpenGLStateHasher> MapStateToId;
76 
77  typedef tbb::concurrent_unordered_map<int, DtIndirectOpenGLState> MapIdToState;
79 
80  typedef tbb::concurrent_unordered_set<int> ConcurrentSetInts;
81 
84 
85  tbb::atomic<int> myNextStateId;
86 
88 
90 
92 
94  };
95 }
ConcurrentSetInts myUniqueAttributes
Definition: DtIndirectGeometryStateManager.h:83
DtDe & myDe
Definition: DtIndirectGeometryStateManager.h:89
#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:75
bool myStateCaching
Definition: DtIndirectGeometryStateManager.h:91
MapIdToState myMapIdToState
Definition: DtIndirectGeometryStateManager.h:78
tbb::concurrent_unordered_set< int > ConcurrentSetInts
Definition: DtIndirectGeometryStateManager.h:80
tbb::concurrent_unordered_map< DtIndirectOpenGLState, int, DtIndirectOpenGLStateHasher > MapStateToId
Definition: DtIndirectGeometryStateManager.h:74
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:82
tbb::concurrent_unordered_map< int, DtIndirectOpenGLState > MapIdToState
Definition: DtIndirectGeometryStateManager.h:77
unsigned int GLenum
Definition: DtGlTextureBufferObject.h:18
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtIndirectOpenGLState myLastAppliedState
Definition: DtIndirectGeometryStateManager.h:87
Contains the DtIndirectOpenGLState class declaration.
bool myReverseZEnabled
Definition: DtIndirectGeometryStateManager.h:93
tbb::atomic< int > myNextStateId
Definition: DtIndirectGeometryStateManager.h:85

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)