diff options
Diffstat (limited to 'src/libjin/Graphics/Canvas.h')
-rw-r--r-- | src/libjin/Graphics/Canvas.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/libjin/Graphics/Canvas.h b/src/libjin/Graphics/Canvas.h new file mode 100644 index 0000000..bccb3f6 --- /dev/null +++ b/src/libjin/Graphics/Canvas.h @@ -0,0 +1,40 @@ +#ifndef __JIN_CANVAS_H +#define __JIN_CANVAS_H +#include "../modules.h" +#if JIN_MODULES_RENDER + +#include "drawable.h" +namespace jin +{ +namespace graphics +{ + class Canvas: public Drawable + { + public: + + static Canvas* createCanvas(int w, int h); + + ~Canvas(); + + void bind(); + + static void unbind(); + + static bool hasbind(GLint fbo); + + private: + + Canvas(int w, int h); + + GLuint fbo; + + // current binded fbo + static GLint cur; + + bool init(); + }; +} // render +} // jin + +#endif // JIN_MODULES_RENDER +#endif // __JIN_CANVAS_H
\ No newline at end of file |