diff options
| author | chai <chaifix@163.com> | 2019-04-06 07:39:49 +0800 |
|---|---|---|
| committer | chai <chaifix@163.com> | 2019-04-06 07:39:49 +0800 |
| commit | e47baca4f23db43ec91fbf64d5d06d7c0dbee495 (patch) | |
| tree | 9e909413bbf61834570e7dbdbe37fc8705f12730 /source/modules/asura-core/graphics/gl.h | |
| parent | e13616b5c40f912853be99f0603f0e4c97b22062 (diff) | |
*misc
Diffstat (limited to 'source/modules/asura-core/graphics/gl.h')
| -rw-r--r-- | source/modules/asura-core/graphics/gl.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/source/modules/asura-core/graphics/gl.h b/source/modules/asura-core/graphics/gl.h index 6838bc9..e3c2ffc 100644 --- a/source/modules/asura-core/graphics/gl.h +++ b/source/modules/asura-core/graphics/gl.h @@ -18,6 +18,7 @@ namespace AsuraEngine class Profiler; class Shader; + class GPUBuffer; enum MatrixMode { @@ -35,17 +36,23 @@ namespace AsuraEngine { public: - LUAX_DECL_SINGLETON(GL); - OpenGL(); ~OpenGL(); + /// + /// ʼOpenGLIJڴOpenGL֮˺עOpenGLĵַ + /// + bool Init(const AEMath::Recti& viewport); + void SetViewport(const AEMath::Recti viewport); - AEMath::Recti GetViewport(); + const AEMath::Recti& GetViewport(); void UseShader(Shader* shader); void UnuseShader(); + /// + /// Matrix stackز + /// void SetMatrixMode(MatrixMode mode); MatrixMode GetMatrixMode(); void PushMatrix(); @@ -59,6 +66,13 @@ namespace AsuraEngine uint GetMatrixDepth(); uint GetMatrixIndex(); + /// + /// ʾ + /// + void WipeError(); + bool HasError(); + GLenum GetError(); + /// /// OpenGL3.0Ժû任ӿڡshaderȲﱣһЩOpenGL״̬ע /// ƺȫ̵ģҲ˵Asuraֶ֧߳ȾOpenGLĵĴʹһ @@ -78,6 +92,8 @@ namespace AsuraEngine friend class Profiler; + LUAX_DECL_SINGLETON(OpenGL); + //----------------------------------------------------------------------------// LUAX_DECL_ENUM(MatrixMode, 0); |
