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(); + /// + /// ³õʼ»¯OpenGLÉÏÏÂÎIJÎÊý£¬·¢ÉúÔÚ´´½¨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); |
