vrseasons

annotate 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
rev   line source
nuclear@0 1 #ifndef RTARG_H_
nuclear@0 2 #define RTARG_H_
nuclear@0 3
nuclear@0 4 class RenderTarget {
nuclear@0 5 private:
nuclear@0 6 int xsz, ysz, tex_xsz, tex_ysz;
nuclear@0 7 unsigned int fbo;
nuclear@0 8 unsigned int color, depth;
nuclear@0 9 unsigned int tex_fmt;
nuclear@0 10
nuclear@0 11 public:
nuclear@0 12 RenderTarget();
nuclear@0 13 ~RenderTarget();
nuclear@0 14
nuclear@0 15 bool create(int xsz, int ysz);
nuclear@0 16 bool resize(int xsz, int ysz);
nuclear@0 17 void destroy();
nuclear@0 18
nuclear@0 19 bool is_valid() const;
nuclear@0 20
nuclear@0 21 unsigned int get_texture() const;
nuclear@0 22
nuclear@0 23 int get_width() const;
nuclear@0 24 int get_height() const;
nuclear@0 25 int get_tex_width() const;
nuclear@0 26 int get_tex_height() const;
nuclear@0 27
nuclear@0 28 friend void set_render_target(const RenderTarget *rtarg);
nuclear@0 29 };
nuclear@0 30
nuclear@0 31 void set_render_target(const RenderTarget *rtarg);
nuclear@0 32
nuclear@0 33 #endif /* RTARG_H_ */