diff options
author | chai <chaifix@163.com> | 2018-11-16 00:24:51 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-16 00:24:51 +0800 |
commit | 831e814ce9bdb84e86c06c4a52008f6bdaaa00d6 (patch) | |
tree | f91fccc7d2628d6e0a39886134b2bb174f5eede4 /src/libjin/Graphics/je_gl.h | |
parent | 6dc75930fe5fe02f1af5489917752d315cf9e48f (diff) |
*合并master到minimal分支
Diffstat (limited to 'src/libjin/Graphics/je_gl.h')
-rw-r--r-- | src/libjin/Graphics/je_gl.h | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/src/libjin/Graphics/je_gl.h b/src/libjin/Graphics/je_gl.h index cda8bf9..1dddab3 100644 --- a/src/libjin/Graphics/je_gl.h +++ b/src/libjin/Graphics/je_gl.h @@ -1,10 +1,14 @@ -#ifndef __JE_OPENGL_H -#define __JE_OPENGL_H +#ifndef __JE_OPENGL_H__ +#define __JE_OPENGL_H__ + +#include <vector> -#include "../3rdparty/GLee/GLee.h" -#include "../3rdparty/ogl/OpenGL.h" #include "../math/je_matrix.h" +#include "je_color.h" +#include "GLee/GLee.h" +#include "ogl/OpenGL.h" + namespace JinEngine { namespace Graphics @@ -26,9 +30,35 @@ namespace JinEngine /// /// /// - OpenGL() : ogl2d::OpenGL() - { - } + OpenGL(); + + void setColor(Channel r, Channel g, Channel b, Channel a); + + void setColor(Color c); + + 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; }; @@ -37,4 +67,4 @@ namespace JinEngine } // namespace Graphics } // namespace JinEngine -#endif // __JE_OPENGL_H
\ No newline at end of file +#endif // __JE_OPENGL_H__
\ No newline at end of file |