diff options
Diffstat (limited to 'src/libjin/Graphics/je_gl.h')
-rw-r--r-- | src/libjin/Graphics/je_gl.h | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/src/libjin/Graphics/je_gl.h b/src/libjin/Graphics/je_gl.h index 03bd26a..fba62a1 100644 --- a/src/libjin/Graphics/je_gl.h +++ b/src/libjin/Graphics/je_gl.h @@ -21,16 +21,6 @@ namespace JinEngine /// /// /// - Math::Matrix ProjectionMatrix; -/* - /// - /// - /// - Math::Matrix ModelMatrix; -*/ - /// - /// - /// OpenGL(); void setColor(Channel r, Channel g, Channel b, Channel a); @@ -43,28 +33,48 @@ namespace JinEngine void push(); - void pop(); - void translate(float x, float y); void scale(float sx, float sy); void rotate(float r); - Math::Matrix getModelMatrix(float x, float y, float sx, float sy, float r, float ox, float oy); + void pop(); + + /// + /// Get model view matrix. + /// + Math::Matrix getModelViewMatrix(float x, float y, float sx, float sy, float r, float ox, float oy); + + /// + /// Get model view matrix. + /// + Math::Matrix getModelViewMatrix(); - Math::Matrix getModelMatrix(); + /// + /// Set orthogonal matrix. + /// + void setProjectionMatrix(float l, float r, float b, float t, float n, float f); + + /// + /// Get orthogonal matrix. + /// + const Math::Matrix& getProjectionMatrix(); private: void solve(); Color mCurrentColor; - std::vector<Math::Matrix> mMatrices; - Math::Matrix mMatrix; + + std::vector<Math::Matrix> mModelViewMatrices; + Math::Matrix mModelViewMatrix; + + Math::Matrix mProjectionMatrix; }; + // Singleton. extern OpenGL gl; } // namespace Graphics |