Ewol: Ewol Widget in OpenGl 0.10.0
Main Page
Related Pages
Namespaces
Classes
Files
Link-libs
lutin
ewol
echrono
etk
ejson
exml
esvg
egami
gale
ege
elog
ememory
enet
eproperty
esignal
etranslate
zeus
audio-ess
audio
audio-drain
audio-orchestra
audio-river
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
framework
atria-soft
ewol
ewol
resource
Texture.hpp
Go to the documentation of this file.
1
6
#pragma once
7
8
#include <
etk/types.hpp
>
9
#include <ewol/debug.hpp>
10
#include <
egami/Image.hpp
>
11
#include <gale/resource/Texture.hpp>
12
13
namespace
ewol
{
14
namespace
resource {
15
class
Texture
:
public
gale::Resource {
16
protected
:
17
uint32_t
m_texId
;
18
// openGl Context propoerties :
19
egami::Image
m_data;
20
// some image are not square == > we need to sqared it to prevent some openGl api error the the displayable size is not all the time 0.0 -> 1.0
21
vec2
m_endPointSize;
22
// internal state of the openGl system :
23
bool
m_loaded;
24
// Public API:
25
protected
:
26
void
init(
const
std::string& _filename);
27
void
init();
28
Texture
();
29
public
:
30
DECLARE_RESOURCE_FACTORY(
Texture
);
31
virtual
~
Texture
();
32
public
:
33
// you must set the size here, because it will be set in multiple of pow(2)
34
void
setImageSize(
ivec2
newSize);
35
// get the reference on this image to draw nomething on it ...
36
inline
egami::Image
&
get
() {
37
return
m_data;
38
};
39
// flush the data to send it at the openGl system
40
void
flush();
41
bool
updateContext();
42
void
removeContext();
43
void
removeContextToLate();
44
const
ivec2
& getOpenGlSize()
const
{
45
return
m_data.getSize();
46
};
47
uint32_t getRendererId()
const
{
48
return
m_texId
;
49
};
50
};
51
}
52
}
53
ewol::resource::Texture::m_texId
uint32_t m_texId
openGl textureID.
Definition:
Texture.hpp:17
types.hpp
ewol
Definition:
Area.hpp:16
egami::Image
Image.hpp
etk::Vector2D< float >
ewol::resource::Texture
Definition:
Texture.hpp:15
Generated on Mon Oct 24 2016 15:35:52 for Ewol: Ewol Widget in OpenGl by
1.8.12