Oxygine  1
2g game engine
NativeTextureGLES.h
1 #pragma once
2 #include "oxygine-include.h"
3 #include "../NativeTexture.h"
4 
5 namespace oxygine
6 {
7  DECLARE_SMART(NativeTextureGLES, spNativeTextureGLES);
9  {
10  public:
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;
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 }
nativeTextureHandle getHandle() const
void setLinearFilter(bool enable)
Definition: ImageData.h:54
Definition: VideoDriverGLES20.h:10
–oxgl-end–!
Definition: Actor.h:14
void setClamp2Edge(bool clamp2edge)
Definition: NativeTextureGLES.h:8
Definition: VideoDriverGL.h:13
Definition: NativeTexture.h:10