4 #include "gmath/gmath.h"
15 unsigned int tex_targ;
17 unsigned int rbuf_zstencil;
24 static unsigned int default_fbo; // 0 on most platforms, GLKit fbo on iOS.
29 bool create(unsigned int fmt = GL_RGBA);
30 bool create(int width, int height, unsigned int fmt = GL_RGBA);
31 bool create(Texture *tex, int face = 0);
35 bool resize(int width, int height);
37 int get_width() const;
38 int get_height() const;
40 Texture *get_texture() const;
42 /** calculates a texture matrix to map the full texture space
43 * onto the part of the texture occupied by the render target
45 const Mat4 &get_texture_matrix() const;
49 friend void set_render_target(const RenderTarget *rtarg);
52 void set_render_target(const RenderTarget *rtarg);