diff options
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); |