vrseasons

view src/rtarg.h @ 2:eea1b91dc3d4

added is_complete() to framebuffer object and fixed GL_UNSUPPORTED_FRAMEBUFFER on intel
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 13 Apr 2015 16:51:52 +0300
parents 393ef1143c9c
children
line source
1 #ifndef RTARG_H_
2 #define RTARG_H_
4 class RenderTarget {
5 private:
6 int xsz, ysz, tex_xsz, tex_ysz;
7 unsigned int fbo;
8 unsigned int color, depth;
9 unsigned int tex_fmt;
11 public:
12 RenderTarget();
13 ~RenderTarget();
15 bool create(int xsz, int ysz);
16 bool resize(int xsz, int ysz);
17 void destroy();
19 bool is_valid() const;
20 bool is_complete() const;
22 unsigned int get_texture() const;
24 int get_width() const;
25 int get_height() const;
26 int get_tex_width() const;
27 int get_tex_height() const;
29 friend void set_render_target(const RenderTarget *rtarg);
30 };
32 void set_render_target(const RenderTarget *rtarg);
34 #endif /* RTARG_H_ */