vrseasons

view src/rtarg.h @ 0:393ef1143c9c

VR seasons
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 07 Apr 2015 11:16:56 +0300
parents
children eea1b91dc3d4
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;
21 unsigned int get_texture() const;
23 int get_width() const;
24 int get_height() const;
25 int get_tex_width() const;
26 int get_tex_height() const;
28 friend void set_render_target(const RenderTarget *rtarg);
29 };
31 void set_render_target(const RenderTarget *rtarg);
33 #endif /* RTARG_H_ */