aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/graphics/canvas.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-01-12 21:48:33 +0800
committerchai <chaifix@163.com>2019-01-12 21:48:33 +0800
commit8b00d67febf133e89f6a0bfabc41feed555dc4a9 (patch)
treefe48ef17c250afa40c2588300fcdb5920dba6951 /src/libjin/graphics/canvas.h
parenta907c39756ef6b368d06643afa491c49a9044a8e (diff)
*去掉文件前缀je_
Diffstat (limited to 'src/libjin/graphics/canvas.h')
-rw-r--r--src/libjin/graphics/canvas.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/libjin/graphics/canvas.h b/src/libjin/graphics/canvas.h
new file mode 100644
index 0000000..302764a
--- /dev/null
+++ b/src/libjin/graphics/canvas.h
@@ -0,0 +1,53 @@
+#ifndef __JE_CANVAS_H__
+#define __JE_CANVAS_H__
+#include "../core/configuration.h"
+#if defined(jin_graphics)
+
+#include "graphic.h"
+
+namespace JinEngine
+{
+ namespace Graphics
+ {
+ ///
+ /// Renderable canvas.
+ ///
+ /// A canvas is a rendering target.
+ ///
+ class Canvas : public Graphic
+ {
+ public:
+ ///
+ ///
+ ///
+ static bool isBinded(const Canvas*);
+
+ ///
+ /// Default canvas, aka screen.
+ ///
+ Canvas(GLuint n);
+
+ ///
+ ///
+ ///
+ Canvas(int w, int h);
+
+ ///
+ ///
+ ///
+ ~Canvas();
+
+ inline GLuint getGLFrameBuffer() const { return fbo; };
+
+ protected:
+
+ GLuint fbo;
+
+ };
+
+ } // namespace Graphics
+} // namespace JinEngine
+
+#endif // defined(jin_graphics)
+
+#endif // __JE_CANVAS_H__ \ No newline at end of file