aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/graphics/canvas.h
diff options
context:
space:
mode:
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