VR-Forces 4.8 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvOsg
DtBufferObjectApplyAttribute.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2019 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvOsg/vrvOsg.h
>
13
14
#include <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
:
33
DtBufferObjectApplyAttribute
();
34
36
DtBufferObjectApplyAttribute
(
const
DtBufferObjectApplyAttribute
& copy,
const
osg::CopyOp& copyOp =
37
osg::CopyOp::SHALLOW_COPY);
38
40
virtual
~
DtBufferObjectApplyAttribute
();
41
43
virtual
void
addBufferObject(
DtGlBuffer
* ubo,
GLuint
bindingPointIndex);
44
46
virtual
void
removeBufferObject(
DtGlBuffer
* ubo);
47
49
virtual
void
apply(osg::State& state)
const
;
50
52
virtual
int
compare(
const
StateAttribute& sa)
const
= 0;
53
55
virtual
void
releaseGLObjects(osg::State* state
/* =0 */
)
const
;
56
57
protected
:
58
// TODO: Small improvement: change this to a vector.
59
// We iterate much more often than we add or remove from it.
60
typedef
std::map<
DtGlBuffer
*,
GLuint
/* binding point index */
>
BufferMap
;
61
BufferMap
myBufferMap
;
62
63
private
:
66
DtBufferObjectApplyAttribute
& operator=(
const
DtBufferObjectApplyAttribute
&);
67
};
68
}
DT_DLL_VRVOSG
#define DT_DLL_VRVOSG
Definition:
vrvOsg.h:23
GLuint
unsigned int GLuint
Definition:
DtGlTextureBufferObject.h:17
makVrv::DtBufferObjectApplyAttribute::BufferMap
std::map< DtGlBuffer *, GLuint > BufferMap
Definition:
DtBufferObjectApplyAttribute.h:60
makVrv::DtGlBuffer
A generic OpenGL buffer.
Definition:
DtGlBuffer.h:25
makVrv::DtBufferObjectApplyAttribute
Manage buffer object binding state, via glBindBufferBase.
Definition:
DtBufferObjectApplyAttribute.h:29
vrvOsg.h
Contains DLL export macros.
makVrv::DtBufferObjectApplyAttribute::myBufferMap
BufferMap myBufferMap
Definition:
DtBufferObjectApplyAttribute.h:61
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
)