diff options
Diffstat (limited to 'src/libjin/Game')
-rw-r--r-- | src/libjin/Game/je_application.cpp | 12 | ||||
-rw-r--r-- | src/libjin/Game/je_entity.h | 4 | ||||
-rw-r--r-- | src/libjin/Game/je_gameobject.h | 9 |
3 files changed, 12 insertions, 13 deletions
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(); diff --git a/src/libjin/Game/je_entity.h b/src/libjin/Game/je_entity.h index 39822b6..80c6ff3 100644 --- a/src/libjin/Game/je_entity.h +++ b/src/libjin/Game/je_entity.h @@ -7,7 +7,7 @@ namespace JinEngine { namespace Game { - +/* /// /// /// @@ -20,7 +20,7 @@ namespace JinEngine }; - +*/ } // namespace Game } // namespace JinEngine diff --git a/src/libjin/Game/je_gameobject.h b/src/libjin/Game/je_gameobject.h index fefc6df..7c6ec2b 100644 --- a/src/libjin/Game/je_gameobject.h +++ b/src/libjin/Game/je_gameobject.h @@ -16,7 +16,7 @@ namespace JinEngine { namespace Game { - + /* /// /// Game object base class. /// @@ -61,10 +61,7 @@ namespace JinEngine bool mIsVisible; // if the entity is visible or not bool mIsActive; // if the entity is joined into the logic - /// - /// Position of entity. - /// - Math::Vector2<float> mPosition; + Math::Transform mTransform; }; @@ -77,7 +74,7 @@ namespace JinEngine /// Entity set. For searching and keeps entities unique and sorted. /// typedef std::set<GameObject*> EntitySet; - + */ } // namespace Game } // namespace JinEngine |