Crazy Eddie's GUI System
0.8.4
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
RenderingSurface.h
1
/***********************************************************************
2
created: Mon Jan 12 2009
3
author: Paul D Turner
4
*************************************************************************/
5
/***************************************************************************
6
* Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team
7
*
8
* Permission is hereby granted, free of charge, to any person obtaining
9
* a copy of this software and associated documentation files (the
10
* "Software"), to deal in the Software without restriction, including
11
* without limitation the rights to use, copy, modify, merge, publish,
12
* distribute, sublicense, and/or sell copies of the Software, and to
13
* permit persons to whom the Software is furnished to do so, subject to
14
* the following conditions:
15
*
16
* The above copyright notice and this permission notice shall be
17
* included in all copies or substantial portions of the Software.
18
*
19
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25
* OTHER DEALINGS IN THE SOFTWARE.
26
***************************************************************************/
27
#ifndef _CEGUIRenderingSurface_h_
28
#define _CEGUIRenderingSurface_h_
29
30
#include "CEGUI/EventSet.h"
31
#include "CEGUI/EventArgs.h"
32
#include "CEGUI/RenderQueue.h"
33
34
#if defined(_MSC_VER)
35
# pragma warning(push)
36
# pragma warning(disable : 4251)
37
#endif
38
39
40
// Start of CEGUI namespace section
41
namespace
CEGUI
42
{
43
//----------------------------------------------------------------------------//
45
enum
RenderQueueID
46
{
47
RQ_USER_0,
49
RQ_UNDERLAY
,
50
RQ_USER_1,
52
RQ_BASE
,
53
RQ_USER_2,
55
RQ_CONTENT_1
,
56
RQ_USER_3,
58
RQ_CONTENT_2
,
59
RQ_USER_4,
61
RQ_OVERLAY
,
62
RQ_USER_5
63
};
64
65
//----------------------------------------------------------------------------//
66
73
class
CEGUIEXPORT
RenderQueueEventArgs
:
public
EventArgs
74
{
75
public
:
84
RenderQueueEventArgs
(
const
RenderQueueID
id
);
85
87
RenderQueueID
queueID
;
88
};
89
90
//----------------------------------------------------------------------------//
91
108
class
CEGUIEXPORT
RenderingSurface
:
109
public
EventSet
,
110
public
AllocatedObject
<RenderingSurface>
111
{
112
public
:
114
static
const
String
EventNamespace
;
122
static
const
String
EventRenderQueueStarted
;
129
static
const
String
EventRenderQueueEnded
;
130
148
RenderingSurface
(
RenderTarget
& target);
149
151
virtual
~
RenderingSurface
();
152
173
void
addGeometryBuffer(
const
RenderQueueID
queue,
174
const
GeometryBuffer
& buffer);
175
187
void
removeGeometryBuffer(
const
RenderQueueID
queue,
188
const
GeometryBuffer
& buffer);
189
202
void
clearGeometry(
const
RenderQueueID
queue);
203
212
void
clearGeometry();
213
224
virtual
void
draw();
225
238
virtual
void
invalidate();
239
255
bool
isInvalidated()
const
;
256
266
virtual
bool
isRenderingWindow()
const
;
267
290
virtual
RenderingWindow
& createRenderingWindow(
TextureTarget
& target);
291
305
virtual
void
destroyRenderingWindow(
RenderingWindow
& window);
306
308
318
virtual
void
transferRenderingWindow(
RenderingWindow
& window);
319
329
const
RenderTarget
& getRenderTarget()
const
;
330
RenderTarget
& getRenderTarget();
331
332
protected
:
336
virtual
void
drawContent();
337
339
void
draw(
const
RenderQueue
& queue,
RenderQueueEventArgs
& args);
340
342
void
detatchWindow(
RenderingWindow
& w);
343
345
void
attachWindow(
RenderingWindow
& w);
346
348
typedef
std::map<
RenderQueueID
,
RenderQueue
349
/*CEGUI_MAP_ALLOC(RenderQueueID, RenderQueue)*/
>
RenderQueueList
;
351
typedef
std::vector<
RenderingWindow
*
352
CEGUI_VECTOR_ALLOC(
RenderingWindow
*)>
RenderingWindowList
;
354
RenderQueueList
d_queues
;
356
RenderingWindowList
d_windows
;
358
RenderTarget
*
d_target
;
360
bool
d_invalidated
;
361
};
362
363
}
// End of CEGUI namespace section
364
365
#if defined(_MSC_VER)
366
# pragma warning(pop)
367
#endif
368
369
#endif // end of guard _CEGUIRenderingSurface_h_
cegui
include
CEGUI
RenderingSurface.h
Generated by
1.8.3.1