HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RE_OGLVertexArrayList.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: RE_OGLVertexArrayList.h ( RE Library, C++)
7
*
8
* COMMENTS:
9
* Implements an OpenGL Vertex Array Object, which is a collection of
10
* vertex buffer bindings to various attribute types (vertex, color,
11
* normal...)
12
*
13
* Note that this object is not shared with other shared contexts. It only
14
* exists in the OpenGL context that created it.
15
*/
16
#ifndef RE_OGLVertexArrayList_h
17
#define RE_OGLVertexArrayList_h
18
19
#include "
RE_ContextSpecificObject.h
"
20
#include "
RE_ContextSpecificTable.h
"
21
22
class
RE_API
RE_OGLVertexArrayList
:
public
RE_ContextSpecificObject
23
{
24
public
:
25
RE_OGLVertexArrayList
() : myID(0), myCurrentElementBufferID(-1) {}
26
~
RE_OGLVertexArrayList
()
override
;
27
28
static
void
createContextDefault(
RE_Render
*
r
);
29
static
void
bindContextDefault(
RE_Render
*
r
);
30
static
void
deleteContextDefault(
RE_Render
*
r
);
31
32
bool
init
(
RE_Render
*
r
)
override
;
33
bool
bind(
RE_Render
*
r
);
34
static
void
unbind(
RE_Render
*
r
);
35
36
bool
setElementBuffer
(
int
id
)
37
{
38
if
(myCurrentElementBufferID !=
id
)
39
{
40
myCurrentElementBufferID =
id
;
41
return
true
;
42
}
43
return
false
;
44
}
45
46
unsigned
int
getID
()
const
{
return
myID; }
47
private
:
48
unsigned
int
myID;
49
unsigned
int
myCurrentElementBufferID;
50
};
51
52
typedef
RE_ContextSpecificTable<RE_OGLVertexArrayList>
53
RE_SharedVertexArray
;
54
55
#endif
RE_ContextSpecificTable< RE_OGLVertexArrayList >
RE_API
#define RE_API
Definition:
RE_API.h:10
RE_ContextSpecificObject::init
virtual bool init(RE_Render *r)=0
RE_OGLVertexArrayList::RE_OGLVertexArrayList
RE_OGLVertexArrayList()
Definition:
RE_OGLVertexArrayList.h:25
RE_SharedVertexArray
RE_ContextSpecificTable< RE_OGLVertexArrayList > RE_SharedVertexArray
Definition:
RE_OGLVertexArrayList.h:53
RE_ContextSpecificObject.h
RE_OGLVertexArrayList::setElementBuffer
bool setElementBuffer(int id)
Definition:
RE_OGLVertexArrayList.h:36
RE_Render
Definition:
RE_Render.h:29
RE_ContextSpecificTable.h
id
GLuint id
Definition:
glcorearb.h:655
RE_OGLVertexArrayList
Definition:
RE_OGLVertexArrayList.h:22
RE_OGLVertexArrayList::getID
unsigned int getID() const
Definition:
RE_OGLVertexArrayList.h:46
RE_ContextSpecificObject
Definition:
RE_ContextSpecificObject.h:25
r
GLboolean r
Definition:
glcorearb.h:1222
RE
RE_OGLVertexArrayList.h
Generated on Sat Oct 5 2024 02:44:27 for HDK by
1.8.6