From fc7b4579e49aaeecc81919e247e03f68bd5abfd4 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 18 Nov 2018 22:32:55 +0800 Subject: =?UTF-8?q?*=E7=B2=92=E5=AD=90=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Game/je_application.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/libjin/Game/je_application.cpp') diff --git a/src/libjin/Game/je_application.cpp b/src/libjin/Game/je_application.cpp index a5a8812..723a809 100644 --- a/src/libjin/Game/je_application.cpp +++ b/src/libjin/Game/je_application.cpp @@ -6,20 +6,21 @@ #include "../time/je_timer.h" #include "../input/je_event.h" #include "../graphics/je_window.h" +#include "../graphics/je_gl.h" #include "../math/je_math.h" #include "je_application.h" +using namespace JinEngine::Graphics; +using namespace JinEngine::Input; +using namespace JinEngine::Time; +using namespace JinEngine::Math; + namespace JinEngine { namespace Game { - using namespace JinEngine::Graphics; - using namespace JinEngine::Input; - using namespace JinEngine::Time; - using namespace JinEngine::Math; - Application::Application() :_running(true) {}; /* default game loop */ @@ -49,6 +50,7 @@ namespace JinEngine dt = current - previous; if (_onUpdate != nullptr) _onUpdate(dt); + glClear(GL_COLOR_BUFFER_BIT); if (_onDraw != nullptr) _onDraw(); wnd->swapBuffers(); -- cgit v1.1-26-g67d0