DI-Guy SDK Documentation  13.1
diguyOsgTextureBufferObjectApplyAttribute.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #ifndef diguyOsgTextureBufferObjectApplyAttribute_h__
7 #define diguyOsgTextureBufferObjectApplyAttribute_h__
8 
9 #include <map>
10 #include <osg/StateAttribute>
11 
13 
14 class diguyOsgTextureBufferObjectApplyAttribute : public osg::StateAttribute
15 {
16 public:
18 
19  void addTextureBuffferObject(size_t index, diguyOsgTextureBufferObject* texture);
21  void removeTextureBufferObject(size_t index, diguyOsgTextureBufferObject* texture);
22 
24  osg::CopyOp::SHALLOW_COPY);
25 
27 
28  virtual void apply(osg::State& state) const;
29 
30  virtual int compare(const StateAttribute& sa) const;
31 
32  META_StateAttribute(osg, diguyOsgTextureBufferObjectApplyAttribute, osg::StateAttribute::Type(TRANSFORMFEEDBACKBUFFERBINDING+2))
33 private:
34  typedef std::map<size_t, diguyOsgTextureBufferObject*> MapTexUnitToTextureBufferObjects;
35  MapTexUnitToTextureBufferObjects myMapTexUnitToTextures;
36 };
37 
38 #endif // diguyOsgTextureBufferObjectApplyAttribute_h__
META_StateAttribute(osg, diguyOsgTextureBufferObjectApplyAttribute, osg::StateAttribute::Type(TRANSFORMFEEDBACKBUFFERBINDING+2)) private MapTexUnitToTextureBufferObjects myMapTexUnitToTextures
Definition: diguyOsgTextureBufferObjectApplyAttribute.h:32
Definition: diguyOsgTextureBufferObjectApplyAttribute.h:14
diguyOsgTextureBufferObjectApplyAttribute()
Definition: diguyOsgTextureBufferObjectApplyAttribute.cpp:17
void addTextureBuffferObject(size_t index, diguyOsgTextureBufferObject *texture)
Definition: diguyOsgTextureBufferObjectApplyAttribute.cpp:21
virtual int compare(const StateAttribute &sa) const
Definition: diguyOsgTextureBufferObjectApplyAttribute.cpp:75
void removeTextureBufferObject(size_t index, diguyOsgTextureBufferObject *texture)
Definition: diguyOsgTextureBufferObjectApplyAttribute.cpp:38
Definition: diguyOsgTextureBufferObject.h:10
virtual ~diguyOsgTextureBufferObjectApplyAttribute()
Definition: diguyOsgTextureBufferObjectApplyAttribute.cpp:51
virtual void apply(osg::State &state) const
Definition: diguyOsgTextureBufferObjectApplyAttribute.cpp:56
diguyOsgTextureBufferObject * getTextureBufferObject(size_t index)
Definition: diguyOsgTextureBufferObjectApplyAttribute.cpp:27