VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgTextureApplyAttribute.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <map>
13 #include <osg/StateAttribute>
14 
15 namespace osg
16 {
17  class State;
18 }
19 
20 namespace makVrv
21 {
22  class DtGlTexture;
23 
24  class TextureApplyAttribute : public osg::StateAttribute
25  {
26  public:
28 
29  void addTexture(size_t index, DtGlTexture* texture);
30  DtGlTexture* getTexture(size_t index);
31  void removeTexture(size_t index, DtGlTexture* texture);
32 
33  TextureApplyAttribute(const TextureApplyAttribute& copy, const osg::CopyOp& copyOp =
34  osg::CopyOp::SHALLOW_COPY);
35 
36  virtual ~TextureApplyAttribute();
37 
38  virtual void apply(osg::State& state) const;
39 
40  virtual int compare(const StateAttribute& sa) const;
41 
42  virtual void releaseGLObjects(osg::State* state/* =0 */) const;
43 
44  META_StateAttribute(osg, TextureApplyAttribute, osg::StateAttribute::Type(TRANSFORMFEEDBACKBUFFERBINDING+1))
45  private:
46  typedef std::map<size_t, DtGlTexture*> MapTexUnitToTextures;
47  MapTexUnitToTextures myMapTexUnitToTextures;
48  };
49 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)