MyGUI
3.2.1
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
mygui
MyGUIEngine
include
MyGUI_ITexture.h
Go to the documentation of this file.
1
/*
2
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
3
* Distributed under the MIT License
4
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5
*/
6
7
#ifndef __MYGUI_I_TEXTURE_H__
8
#define __MYGUI_I_TEXTURE_H__
9
10
#include "
MyGUI_Prerequest.h
"
11
#include "
MyGUI_IRenderTarget.h
"
12
#include "
MyGUI_RenderFormat.h
"
13
#include <string>
14
15
namespace
MyGUI
16
{
17
class
ITexture;
18
19
class
MYGUI_EXPORT
ITextureInvalidateListener
20
{
21
public
:
22
virtual
~ITextureInvalidateListener
() { }
23
virtual
void
textureInvalidate(
ITexture
* _texture) = 0;
24
};
25
26
class
MYGUI_EXPORT
ITexture
27
{
28
public
:
29
virtual
~ITexture
() { }
30
31
virtual
const
std::string& getName()
const
= 0;
32
33
virtual
void
createManual(
int
_width,
int
_height,
TextureUsage
_usage,
PixelFormat
_format) = 0;
34
virtual
void
loadFromFile(
const
std::string& _filename) = 0;
35
virtual
void
saveToFile(
const
std::string& _filename) = 0;
36
37
virtual
void
setInvalidateListener
(
ITextureInvalidateListener
* _listener) { }
38
39
virtual
void
destroy() = 0;
40
41
virtual
void
* lock(
TextureUsage
_access) = 0;
42
virtual
void
unlock() = 0;
43
virtual
bool
isLocked() = 0;
44
45
virtual
int
getWidth() = 0;
46
virtual
int
getHeight() = 0;
47
48
virtual
PixelFormat
getFormat() = 0;
49
virtual
TextureUsage
getUsage() = 0;
50
virtual
size_t
getNumElemBytes() = 0;
51
52
virtual
IRenderTarget
* getRenderTarget()
53
{
54
return
nullptr
;
55
}
56
};
57
58
}
// namespace MyGUI
59
60
#endif // __MYGUI_I_TEXTURE_H__
Generated on Wed Aug 20 2014 00:03:32 for MyGUI by
1.8.3.1