aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/je_canvas.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-10-23 12:23:58 +0800
committerchai <chaifix@163.com>2018-10-23 12:23:58 +0800
commit40fc27154fe754181934dc7ee31375e6bdfb33fc (patch)
tree897ad98d759bc308ef66561181ba88b85f2ccd47 /src/libjin/Graphics/je_canvas.h
parent1480c9445100075c9e1a894eb07c0ef727b509a1 (diff)
*merge from minimal
Diffstat (limited to 'src/libjin/Graphics/je_canvas.h')
-rw-r--r--src/libjin/Graphics/je_canvas.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/libjin/Graphics/je_canvas.h b/src/libjin/Graphics/je_canvas.h
new file mode 100644
index 0000000..f39b0de
--- /dev/null
+++ b/src/libjin/Graphics/je_canvas.h
@@ -0,0 +1,68 @@
+#ifndef __JE_CANVAS_H
+#define __JE_CANVAS_H
+#include "../core/je_configuration.h"
+#if defined(jin_graphics)
+
+#include "je_graphic.h"
+
+namespace JinEngine
+{
+ namespace Graphics
+ {
+ ///
+ /// Renderable canvas.
+ ///
+ /// A canvas is a rendering target.
+ ///
+ class Canvas: public Graphic
+ {
+ public:
+ ///
+ ///
+ ///
+ static Canvas* createCanvas(int w, int h);
+
+ ///
+ ///
+ ///
+ static void bind(Canvas*);
+
+ ///
+ ///
+ ///
+ static void unbind();
+
+ ///
+ ///
+ ///
+ static bool isBinded(const Canvas*);
+
+ ///
+ ///
+ ///
+ ~Canvas();
+
+ protected:
+ static const Canvas* const DEFAULT_CANVAS;
+ static const Canvas* current;
+
+ ///
+ ///
+ ///
+ Canvas(int w, int h);
+
+ ///
+ ///
+ ///
+ Canvas(GLuint n);
+
+ GLuint fbo;
+
+ };
+
+ } // namespace Graphics
+} // namespace JinEngine
+
+#endif // defined(jin_graphics)
+
+#endif // __JE_CANVAS_H \ No newline at end of file