summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/graphics/gl.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-04-02 08:47:15 +0800
committerchai <chaifix@163.com>2019-04-02 08:47:15 +0800
commit250e30d73f09e9da2b5a81d0fbae63744ae12a73 (patch)
tree0f55daf334c073e1779d7a1284799a2056aad714 /source/modules/asura-core/graphics/gl.h
parent66fe16dd5ed57ae958fc25158d0defae2e6fae6a (diff)
*misc
Diffstat (limited to 'source/modules/asura-core/graphics/gl.h')
-rw-r--r--source/modules/asura-core/graphics/gl.h19
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;
+
};
///