summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/graphics/gl.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-core/graphics/gl.h')
-rw-r--r--source/modules/asura-core/graphics/gl.h20
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