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