diff options
author | chai <chaifix@163.com> | 2018-11-15 21:44:02 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-15 21:44:02 +0800 |
commit | e654344bc262c8393559e5cd535f440133fb2406 (patch) | |
tree | 7ac96581726c7d81599d72fdd811b5d991e2e362 /src/libjin/Graphics/je_gl.h | |
parent | 7e51ff3bfae0becc260452a427a1fc1232a4b348 (diff) |
*渲染矩阵
Diffstat (limited to 'src/libjin/Graphics/je_gl.h')
-rw-r--r-- | src/libjin/Graphics/je_gl.h | 25 |
1 files changed, 22 insertions, 3 deletions
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 <vector> + #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<Math::Matrix> mMatrices; + Math::Matrix mMatrix; }; |