aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Render/Canvas.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/Render/Canvas.h')
-rw-r--r--src/libjin/Render/Canvas.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/libjin/Render/Canvas.h b/src/libjin/Render/Canvas.h
new file mode 100644
index 0000000..8cced23
--- /dev/null
+++ b/src/libjin/Render/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 render
+{
+ 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();
+ };
+}
+}
+
+#endif
+#endif // JIN_MODULES_RENDER