From e654344bc262c8393559e5cd535f440133fb2406 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 15 Nov 2018 21:44:02 +0800 Subject: =?UTF-8?q?*=E6=B8=B2=E6=9F=93=E7=9F=A9=E9=98=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Graphics/je_gl.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/libjin/Graphics/je_gl.h') diff --git a/src/libjin/Graphics/je_gl.h b/src/libjin/Graphics/je_gl.h index 331d899..1dddab3 100644 --- a/src/libjin/Graphics/je_gl.h +++ b/src/libjin/Graphics/je_gl.h @@ -1,6 +1,8 @@ #ifndef __JE_OPENGL_H__ #define __JE_OPENGL_H__ +#include + #include "../math/je_matrix.h" #include "je_color.h" @@ -28,9 +30,7 @@ namespace JinEngine /// /// /// - OpenGL() : ogl2d::OpenGL() - { - } + OpenGL(); void setColor(Channel r, Channel g, Channel b, Channel a); @@ -38,8 +38,27 @@ namespace JinEngine Color getColor(); + void clearMatrix(); + + void push(); + + void pop(); + + void translate(float x, float y); + + void scale(float sx, float sy); + + void rotate(float r); + + const Math::Matrix& getMatrix() { return mMatrix; }; + private: + + void calcMatrix(); + Color mCurrentColor; + std::vector mMatrices; + Math::Matrix mMatrix; }; -- cgit v1.1-26-g67d0