DI-Guy SDK Documentation  13.5
diguyOsgTextureBufferObjectApplyAttribute.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
8 #include <map>
9 #include <osg/StateAttribute>
10 
15 class diguyOsgTextureBufferObjectApplyAttribute : public osg::StateAttribute
16 {
17 public:
19 
20  void addTextureBuffferObject(size_t index, diguyOsgTextureBufferObject* texture);
22  void removeTextureBufferObject(size_t index, diguyOsgTextureBufferObject* texture);
23 
25  osg::CopyOp::SHALLOW_COPY);
26 
28 
29  virtual void apply(osg::State& state) const;
30 
31  virtual int compare(const StateAttribute& sa) const;
32 
33  META_StateAttribute(osg, diguyOsgTextureBufferObjectApplyAttribute, osg::StateAttribute::Type(TRANSFORMFEEDBACKBUFFERBINDING+2))
34 private:
35  typedef std::map<size_t, diguyOsgTextureBufferObject*> MapTexUnitToTextureBufferObjects;
36  MapTexUnitToTextureBufferObjects myMapTexUnitToTextures;
37 };
38 
META_StateAttribute(osg, diguyOsgTextureBufferObjectApplyAttribute, osg::StateAttribute::Type(TRANSFORMFEEDBACKBUFFERBINDING+2)) private MapTexUnitToTextureBufferObjects myMapTexUnitToTextures
Definition: diguyOsgTextureBufferObjectApplyAttribute.h:33
Definition: diguyOsgTextureBufferObjectApplyAttribute.h:15
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:13
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