diff options
author | chai <chaifix@163.com> | 2018-11-18 23:31:17 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-18 23:31:17 +0800 |
commit | f0f340dec7821cee103ab9267ef941a917ef4dc4 (patch) | |
tree | 2f77f6ce6bdc9f63f002c13d4c261e1d6a9c1729 /src/libjin/graphics/je_canvas.h | |
parent | fc7b4579e49aaeecc81919e247e03f68bd5abfd4 (diff) |
*目录改为小写
Diffstat (limited to 'src/libjin/graphics/je_canvas.h')
-rw-r--r-- | src/libjin/graphics/je_canvas.h | 69 |
1 files changed, 69 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..3964517 --- /dev/null +++ b/src/libjin/graphics/je_canvas.h @@ -0,0 +1,69 @@ +#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 |