diff options
Diffstat (limited to 'source/modules/asura-core/graphics/gl.h')
-rw-r--r-- | source/modules/asura-core/graphics/gl.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/source/modules/asura-core/graphics/gl.h b/source/modules/asura-core/graphics/gl.h index bfc60ea..4d21a5a 100644 --- a/source/modules/asura-core/graphics/gl.h +++ b/source/modules/asura-core/graphics/gl.h @@ -1,7 +1,9 @@ #ifndef __ASURA_ENGINE_OPENGL_H__ #define __ASURA_ENGINE_OPENGL_H__ -#include "glad/glad.h" +#include <asura-utils/math/rect.hpp> + +#include <glad/glad.h> namespace AsuraEngine { @@ -11,7 +13,9 @@ namespace AsuraEngine class Profiler; /// - /// һЩopengl״̬١ + /// һЩopengl״̬١ڱ༭രڻ£һڶӦһhwndһhdcԼ + /// opengl contextʹwglMakeCurrent(hdc, glc)ָǰ̶߳Ⱦhdc + /// openglglcglм¼ľһ̵߳һڵһopenglĵ״̬ /// class OpenGL { @@ -19,6 +23,9 @@ namespace AsuraEngine OpenGL(); ~OpenGL(); + void SetViewport(const AEMath::Recti viewport); + AEMath::Recti GetViewport(); + private: friend class Profiler; @@ -28,6 +35,14 @@ namespace AsuraEngine /// static bool instantiated; + /// + /// ¼opengl״̬ + /// + struct + { + AEMath::Recti viewport; + } state; + }; /// |