diff options
author | chai <chaifix@163.com> | 2019-05-02 21:42:09 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-05-02 21:42:09 +0800 |
commit | 59a0e32991b5b714b6bdba504b6fbacdcd4b907a (patch) | |
tree | 763d10da51491ea88416e159651e97c9193673d8 /source/modules/asura-core/graphics/gl.h | |
parent | 866e00474be3bfe0e7dac73b720af0b9ebf7109a (diff) |
*misc
Diffstat (limited to 'source/modules/asura-core/graphics/gl.h')
-rw-r--r-- | source/modules/asura-core/graphics/gl.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/modules/asura-core/graphics/gl.h b/source/modules/asura-core/graphics/gl.h index 6bb1ee0..a4d9de2 100644 --- a/source/modules/asura-core/graphics/gl.h +++ b/source/modules/asura-core/graphics/gl.h @@ -10,6 +10,7 @@ #include <asura-utils/math/matrix44.h> #include <asura-utils/math/vector4.h> +#include "color.h" #include "matrix_stack.h" namespace AsuraEngine @@ -23,8 +24,8 @@ namespace AsuraEngine enum MatrixMode { MATRIX_MODE_PROJECTION = 0, - MATRIX_MODE_MODEL = 1, - MATRIX_MODE_VIEW = 2, + MATRIX_MODE_MODEL = 1, + MATRIX_MODE_VIEW = 2, }; enum GLParams @@ -62,7 +63,7 @@ namespace AsuraEngine void UseShader(Shader* shader); void UnuseShader(); Shader* GetShader(); - + /// /// ͳdrawcall /// @@ -81,11 +82,12 @@ namespace AsuraEngine void Scale(float x, float y); void Ortho(float l, float r, float b, float t, float n, float f); AEMath::Matrix44& GetMatrix(MatrixMode mode); + AEMath::Matrix44 GetMVPMatrix(); uint GetMatrixDepth(); uint GetMatrixIndex(); void SetDrawColor(float r, float g, float b, float a); - AEMath::Vector4f& GetDrawColor(); + Color& GetDrawColor(); /// /// ʾ @@ -103,11 +105,11 @@ namespace AsuraEngine /// struct { - Shader* shader; ///< ǰʹõshader - AEMath::Recti viewport; ///< ǰлHDC߱ڴСı߲ˢʱ䶯 - MatrixStack matrix[3]; ///< model, view, projection - MatrixMode matrixMode; ///< ǰľ - AEMath::Vector4f drawColor; ///< Ƶɫ + Shader* shader; ///< ǰʹõshader + AEMath::Recti viewport; ///< ǰлHDC߱ڴСı߲ˢʱ䶯 + MatrixStack matrix[3]; ///< model, view, projection + MatrixMode matrixMode; ///< ǰľ + Color drawColor; ///< Ƶɫ } state; #if ASURA_GL_PROFILE |