VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtBufferObjectApplyAttribute.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <unordered_map>
15 
16 #include <osg/StateAttribute>
17 
18 namespace osg
19 {
20  class State;
21 }
22 
23 namespace makVrv
24 {
25  class DtGlBuffer;
26 
29  class DT_DLL_VRVOSG DtBufferObjectApplyAttribute : public osg::StateAttribute
30  {
31  public:
34 
36  DtBufferObjectApplyAttribute(const DtBufferObjectApplyAttribute& copy, const osg::CopyOp& copyOp =
37  osg::CopyOp::SHALLOW_COPY);
38 
41 
42  private:
46 
47  public:
49  virtual void addBufferObject(DtGlBuffer* ubo, GLuint bindingPointIndex);
50 
52  virtual void removeBufferObject(DtGlBuffer* ubo);
53 
55  virtual void apply(osg::State& state) const;
56 
58  virtual int compare(const StateAttribute& sa) const = 0;
59 
61  virtual void releaseGLObjects(osg::State* state/* =0 */) const;
62 
63  protected:
64  typedef std::unordered_map<DtGlBuffer*, GLuint /* binding point index */> BufferMap;
66  };
67 }
std::unordered_map< DtGlBuffer *, GLuint > BufferMap
Definition: DtBufferObjectApplyAttribute.h:64
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:17
A generic OpenGL buffer.
Definition: DtGlBuffer.h:27
Manage buffer object binding state, via glBindBufferBase.
Definition: DtBufferObjectApplyAttribute.h:29
Contains DLL export macros.
BufferMap myBufferMap
Definition: DtBufferObjectApplyAttribute.h:65

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)