BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
VIEW
RENDERING
vertexBuffer.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
// $Id: vertexBuffer.h,v 1.6 2005/12/23 17:02:21 amoll Exp $
5
//
6
7
#ifndef BALL_VIEW_RENDERING_VERTEXBUFFER_H
8
#define BALL_VIEW_RENDERING_VERTEXBUFFER_H
9
10
#ifndef BALL_COMMON_H
11
# include <
BALL/common.h
>
12
#endif
13
14
#ifndef BALL_VIEW_KERNEL_COMMON_H
15
# include <
BALL/VIEW/KERNEL/common.h
>
16
#endif
17
18
#ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
19
# include <
BALL/VIEW/DATATYPE/colorRGBA.h
>
20
#endif
21
22
namespace
BALL
23
{
24
namespace
VIEW
25
{
26
class
Mesh;
27
class
GLRenderer;
28
40
class
BALL_VIEW_EXPORT
MeshBuffer
41
{
42
public
:
43
44
BALL_CREATE
(
MeshBuffer
)
45
46
typedef GLuint Buffer[4];
47
49
MeshBuffer
();
50
52
MeshBuffer
(const
MeshBuffer
& mesh_buffer);
53
55
virtual ~
MeshBuffer
();
56
60
static
bool
initGL();
61
63
const MeshBuffer& operator = (const MeshBuffer& buffer);
64
66
const
Mesh
* getMesh() {
return
mesh_;}
67
69
void
setMesh
(
const
Mesh
& mesh) {mesh_ = & mesh;}
70
72
bool
initialize();
73
75
bool
draw();
76
78
void
clear();
79
81
void
clearBuffer();
82
84
bool
isBusy
()
const
{
return
busy_;}
85
91
static
void
setGLRenderer
(
GLRenderer
* renderer) { gl_renderer_ = renderer;}
92
93
protected
:
94
95
const
Mesh
*
mesh_
;
96
Buffer
buffer_
;
97
bool
filled_
;
98
static
GLRenderer
*
gl_renderer_
;
99
bool
busy_
;
100
bool
multiple_colors_
;
101
ColorRGBA
color_
;
102
Size
vertices_
;
103
Size
triangles_
;
104
};
105
106
}
// namespace VIEW
107
}
// namespace BALL
108
109
#endif // BALL_VIEW_RENDERING_VERTEXBUFFER_H
Generated by
1.8.3.1