diff options
author | chai <chaifix@163.com> | 2019-08-04 17:19:51 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-04 17:19:51 +0800 |
commit | 7638df1ed1f0f314d78bd42e0aba084ba14ade0a (patch) | |
tree | d27bfdebae13e750307520232d5e003a140518a6 /source/modules/asura-core/Graphics/GfxDevice.h | |
parent | bad78945ceba425f6a80e3b8dca2414d592970eb (diff) |
*misc
Diffstat (limited to 'source/modules/asura-core/Graphics/GfxDevice.h')
-rw-r--r-- | source/modules/asura-core/Graphics/GfxDevice.h | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/source/modules/asura-core/Graphics/GfxDevice.h b/source/modules/asura-core/Graphics/GfxDevice.h index 1f50b57..02c7392 100644 --- a/source/modules/asura-core/Graphics/GfxDevice.h +++ b/source/modules/asura-core/Graphics/GfxDevice.h @@ -42,47 +42,44 @@ public: static GfxDevice& Get(); - int GetParam(GLParams param); + int GetParam(GLParams param); - bool Init(const AEMath::Recti& viewport); - bool Inited(); + bool Init(const AEMath::Recti& viewport); + bool Inited(); - void SetViewport(const AEMath::Recti viewport); + void SetViewport(const AEMath::Recti viewport); const AEMath::Recti& GetViewport(); - void SetMatrixMode(MatrixMode mode); - MatrixMode GetMatrixMode(); + void PushMatrix(); + void PopMatrix(); - void PushMatrix(); - void PopMatrix(); + void LoadIdentity(); + void Rotate(float angle); + void Translate(float x, float y); + void Scale(float x, float y); + void Ortho(float l, float r, float b, float t, float n, float f); - void LoadIdentity(); - void Rotate(float angle); - void Translate(float x, float y); - void Scale(float x, float y); - void Ortho(float l, float r, float b, float t, float n, float f); + uint GetMatrixDepth(); + uint GetMatrixIndex(); - uint GetMatrixDepth(); - uint GetMatrixIndex(); + void DrawArrays(GLenum mode, GLint first, GLsizei count); AEMath::Matrix44& GetMatrix(MatrixMode mode); AEMath::Matrix44 GetMVPMatrix(); - void SetDrawColor(float r, float g, float b, float a); - Color& GetDrawColor(); - - void SetActiveCanvas(Canvas* = NULL); - Canvas* GetActiveCanvas() const; + void SetDrawColor(float r, float g, float b, float a); + Color& GetDrawColor(); void SetActiveShader(Shader* = NULL); Shader* GetActiveShader() const; - void DrawArrays(GLenum mode, GLint first, GLsizei count); + void WipeError(); + bool HasError(); + GLenum GetError(); - void WipeError(); - bool HasError(); - GLenum GetError(); + GET_SET(MatrixMode, MatrixMode, state.matrixMode); + GET_SET(Canvas*, ActiveCanvas, state.canvas); private: @@ -130,9 +127,14 @@ luaxport: }; -// ȫ GfxDevice extern GfxDevice g_Device; + +#define GL_CALL(x) do { x; /*GLAssert(); */} while(0) + + + + namespace_end namespace_end |