Oxygine
1
2g game engine
oxygine
src
core
gl
NativeTextureGLES.h
1
#pragma once
2
#include "oxygine-include.h"
3
#include "../NativeTexture.h"
4
5
namespace
oxygine
6
{
7
DECLARE_SMART(NativeTextureGLES, spNativeTextureGLES);
8
class
NativeTextureGLES
:
public
NativeTexture
9
{
10
public
:
11
~
NativeTextureGLES
();
12
13
void
init(nativeTextureHandle
id
,
int
w,
int
h, TextureFormat tf);
14
void
init(
int
w,
int
h, TextureFormat tf,
bool
renderTarget);
15
void
init(
const
ImageData
& src,
bool
sysMemCopy);
16
void
release();
17
void
swap(
NativeTexture
*) ;
18
19
nativeTextureHandle
getHandle
()
const
;
20
int
getWidth()
const
;
21
int
getHeight()
const
;
22
TextureFormat getFormat()
const
;
23
unsigned
int
getFboID()
const
;
24
25
ImageData
lock(lock_flags,
const
Rect
* src);
26
void
unlock();
27
28
void
setLinearFilter
(
bool
enable);
29
void
setClamp2Edge
(
bool
clamp2edge);
30
31
void
updateRegion(
int
x,
int
y,
const
ImageData
& data);
32
void
apply(
const
Rect
* rect = 0);
33
34
protected
:
35
void
* _getRestorableObject() {
return
this
;}
36
friend
class
VideoDriverGL
;
37
friend
class
VideoDriverGLES20
;
38
NativeTextureGLES
();
39
40
size_t
_id;
41
size_t
_fbo;
42
43
TextureFormat _format;
44
int
_width;
45
int
_height;
46
47
48
std::vector<unsigned char> _data;
49
int
_lockFlags;
50
Rect
_lockRect;
51
};
52
}
oxygine::NativeTextureGLES::getHandle
nativeTextureHandle getHandle() const
oxygine::NativeTextureGLES::setLinearFilter
void setLinearFilter(bool enable)
oxygine::ImageData
Definition:
ImageData.h:54
oxygine::RectT< Point >
oxygine::VideoDriverGLES20
Definition:
VideoDriverGLES20.h:10
oxygine
–oxgl-end–!
Definition:
Actor.h:14
oxygine::NativeTextureGLES::setClamp2Edge
void setClamp2Edge(bool clamp2edge)
oxygine::NativeTextureGLES
Definition:
NativeTextureGLES.h:8
oxygine::VideoDriverGL
Definition:
VideoDriverGL.h:13
oxygine::NativeTexture
Definition:
NativeTexture.h:10
Generated on Tue Feb 13 2018 05:01:17 for Oxygine by
1.8.14