Crazy Eddie's GUI System
0.8.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
RendererModules/DirectFB/GeometryBuffer.h
1
/***********************************************************************
2
filename: CEGUIDirectFBGeometryBuffer.h
3
created: Tue Mar 10 2009
4
author: Paul D Turner (parts based on code by Keith Mok)
5
*************************************************************************/
6
/***************************************************************************
7
* Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
8
*
9
* Permission is hereby granted, free of charge, to any person obtaining
10
* a copy of this software and associated documentation files (the
11
* "Software"), to deal in the Software without restriction, including
12
* without limitation the rights to use, copy, modify, merge, publish,
13
* distribute, sublicense, and/or sell copies of the Software, and to
14
* permit persons to whom the Software is furnished to do so, subject to
15
* the following conditions:
16
*
17
* The above copyright notice and this permission notice shall be
18
* included in all copies or substantial portions of the Software.
19
*
20
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26
* OTHER DEALINGS IN THE SOFTWARE.
27
***************************************************************************/
28
#ifndef _CEGUIDirectFBGeometryBuffer_h_
29
#define _CEGUIDirectFBGeometryBuffer_h_
30
31
#include "CEGUI/GeometryBuffer.h"
32
#include "CEGUI/Rect.h"
33
#include "CEGUI/Quaternion.h"
34
#include <directfb.h>
35
#include <vector>
36
37
38
// Start of CEGUI namespace section
39
namespace
CEGUI
40
{
41
class
DirectFBRenderer;
42
class
DirectFBTexture;
43
45
class
DirectFBGeometryBuffer
:
public
GeometryBuffer
46
{
47
public
:
49
DirectFBGeometryBuffer
(
DirectFBRenderer
& owner);
51
~DirectFBGeometryBuffer
();
52
53
// Implement GeometryBuffer interface.
54
void
draw
()
const
;
55
void
setTranslation
(
const
Vector3f
& v);
56
void
setRotation
(
const
Quaternion
& r);
57
void
setPivot
(
const
Vector3f
& p);
58
void
setClippingRegion
(
const
Rectf
& region);
59
void
appendVertex
(
const
Vertex
& vertex);
60
void
appendGeometry
(
const
Vertex
*
const
vbuff, uint vertex_count);
61
void
setActiveTexture
(
Texture
* texture);
62
void
reset
();
63
Texture
*
getActiveTexture
()
const
;
64
uint
getVertexCount
()
const
;
65
uint
getBatchCount
()
const
;
66
void
setRenderEffect
(
RenderEffect
* effect);
67
RenderEffect
*
getRenderEffect
();
68
void
setClippingActive
(
const
bool
active);
69
bool
isClippingActive()
const
;
70
71
protected
:
73
void
updateMatrix
()
const
;
74
76
struct
BatchInfo
77
{
78
IDirectFBSurface* texture;
79
uint vertexCount;
80
bool
clip;
81
};
82
84
DirectFBRenderer
&
d_owner
;
86
DirectFBTexture
*
d_activeTexture
;
88
typedef
std::vector<BatchInfo>
BatchList
;
90
BatchList
d_batches
;
92
typedef
std::vector<DFBVertex>
VertexList
;
94
VertexList
d_vertices
;
96
Rectf
d_clipRect
;
98
bool
d_clippingActive
;
100
Vector3f
d_translation
;
102
Quaternion
d_rotation
;
104
Vector3f
d_pivot
;
106
RenderEffect
*
d_effect
;
108
mutable
s32
d_matrix
[9];
110
mutable
bool
d_matrixValid
;
111
};
112
113
}
// End of CEGUI namespace section
114
115
#endif // end of guard _CEGUIDirectFBGeometryBuffer_h_
cegui
include
CEGUI
RendererModules
DirectFB
GeometryBuffer.h
Generated by
1.8.3.1