From 250e30d73f09e9da2b5a81d0fbae63744ae12a73 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 2 Apr 2019 08:47:15 +0800 Subject: *misc --- source/modules/asura-core/graphics/gl.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/modules/asura-core/graphics/gl.cpp') diff --git a/source/modules/asura-core/graphics/gl.cpp b/source/modules/asura-core/graphics/gl.cpp index 41d43a3..9ffe010 100644 --- a/source/modules/asura-core/graphics/gl.cpp +++ b/source/modules/asura-core/graphics/gl.cpp @@ -3,6 +3,8 @@ #include "../core_config.h" #include "gl.h" +using namespace AEMath; + namespace AsuraEngine { namespace Graphics @@ -23,5 +25,20 @@ namespace AsuraEngine { } + //------------------------------------------------------------------------------// + + void OpenGL::SetViewport(const Recti v) + { + glViewport(v.x, v.y, v.w, v.h); + state.viewport = v; + } + + Recti OpenGL::GetViewport() + { + return state.viewport; + } + + + } } \ No newline at end of file -- cgit v1.1-26-g67d0