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
Texture.h
1
/***********************************************************************
2
created: 21/2/2004
3
author: Paul D Turner
4
5
purpose: Defines abstract interface for texture objects. Texture
6
objects are created & destroyed by the Renderer.
7
*************************************************************************/
8
/***************************************************************************
9
* Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
10
*
11
* Permission is hereby granted, free of charge, to any person obtaining
12
* a copy of this software and associated documentation files (the
13
* "Software"), to deal in the Software without restriction, including
14
* without limitation the rights to use, copy, modify, merge, publish,
15
* distribute, sublicense, and/or sell copies of the Software, and to
16
* permit persons to whom the Software is furnished to do so, subject to
17
* the following conditions:
18
*
19
* The above copyright notice and this permission notice shall be
20
* included in all copies or substantial portions of the Software.
21
*
22
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
26
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28
* OTHER DEALINGS IN THE SOFTWARE.
29
***************************************************************************/
30
#ifndef _CEGUITexture_h_
31
#define _CEGUITexture_h_
32
33
#include "CEGUI/Base.h"
34
#include "CEGUI/String.h"
35
#include "CEGUI/Size.h"
36
#include "CEGUI/Vector.h"
37
#include "CEGUI/Rect.h"
38
39
// Start of CEGUI namespace section
40
namespace
CEGUI
41
{
52
class
CEGUIEXPORT
Texture
:
53
public
AllocatedObject
<Texture>
54
{
55
public
:
61
enum
PixelFormat
62
{
64
PF_RGB
,
66
PF_RGBA
,
68
PF_RGBA_4444
,
70
PF_RGB_565
,
72
PF_PVRTC2
,
74
PF_PVRTC4
,
76
PF_RGB_DXT1
,
78
PF_RGBA_DXT1
,
80
PF_RGBA_DXT3
,
82
PF_RGBA_DXT5
83
};
84
89
virtual
~Texture
() {}
90
98
virtual
const
String
& getName()
const
= 0;
99
108
virtual
const
Sizef
& getSize()
const
= 0;
109
118
virtual
const
Sizef
& getOriginalDataSize()
const
= 0;
119
129
virtual
const
Vector2f
& getTexelScaling()
const
= 0;
130
146
virtual
void
loadFromFile(
const
String
& filename,
147
const
String
& resourceGroup) = 0;
148
166
virtual
void
loadFromMemory(
const
void
* buffer,
167
const
Sizef
& buffer_size,
168
PixelFormat pixel_format) = 0;
169
182
virtual
void
blitFromMemory(
const
void
* sourceData,
const
Rectf
& area) = 0;
183
194
virtual
void
blitToMemory(
void
* targetData) = 0;
195
218
virtual
bool
isPixelFormatSupported(
const
PixelFormat fmt)
const
= 0;
219
};
220
221
}
// End of CEGUI namespace section
222
223
#endif // end of guard _CEGUITexture_h_
cegui
include
CEGUI
Texture.h
Generated by
1.8.3.1