VR-Forces 4.8 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) 2018 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 {
30  {
31  public:
34 
37 
38  private:
43 
44  public:
46  virtual int stateId(const DtIndirectOpenGLState& state);
47 
49  virtual bool applyState(int stateId);
50 
52  virtual void restoreAllModes(osg::State &state);
53 
56  virtual void setStateCaching(bool val);
57 
60  virtual bool stateCaching(void) const;
61 
62  protected:
63  typedef tbb::concurrent_unordered_map<DtIndirectOpenGLState, int, DtIndirectOpenGLStateHasher> MapStateToId;
65 
66  typedef tbb::concurrent_unordered_map<int, DtIndirectOpenGLState> MapIdToState;
68 
69  typedef tbb::concurrent_unordered_set<int> ConcurrentSetInts;
70 
73 
74  tbb::atomic<int> myNextStateId;
75 
77 
79  };
80 }
ConcurrentSetInts myUniqueAttributes
Definition: DtIndirectGeometryStateManager.h:72
#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:23
MapStateToId myMapStateToId
Definition: DtIndirectGeometryStateManager.h:64
bool myStateCaching
Definition: DtIndirectGeometryStateManager.h:78
MapIdToState myMapIdToState
Definition: DtIndirectGeometryStateManager.h:67
tbb::concurrent_unordered_set< int > ConcurrentSetInts
Definition: DtIndirectGeometryStateManager.h:69
tbb::concurrent_unordered_map< DtIndirectOpenGLState, int, DtIndirectOpenGLStateHasher > MapStateToId
Definition: DtIndirectGeometryStateManager.h:63
Simple state/glmodes class for handling setting up modes It can now handle generic state modes and at...
Definition: DtIndirectGeometryStateManager.h:29
ConcurrentSetInts myUniqueModes
Definition: DtIndirectGeometryStateManager.h:71
tbb::concurrent_unordered_map< int, DtIndirectOpenGLState > MapIdToState
Definition: DtIndirectGeometryStateManager.h:66
Contains DLL export macros.
DtIndirectOpenGLState myLastAppliedState
Definition: DtIndirectGeometryStateManager.h:76
Contains the DtIndirectOpenGLState class declaration.
tbb::atomic< int > myNextStateId
Definition: DtIndirectGeometryStateManager.h:74

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)