diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/application/Application.cpp | 23 | ||||
-rw-r--r-- | src/application/Application.hpp | 13 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/application/Application.cpp b/src/application/Application.cpp new file mode 100644 index 0000000..ce7c9d8 --- /dev/null +++ b/src/application/Application.cpp @@ -0,0 +1,23 @@ +#include <GLFW/glfw3.h> + +#include "Application.hpp" + +int Application::Init() +{ + return glfwInit() == GLFW_TRUE ? 0 : 1; +} + +void Application::Terminate() +{ + glfwTerminate(); +} + +void Application::SwapInterval(int interval) +{ + glfwSwapInterval(interval); +} + +GLfloat Application::GetTime() +{ + return glfwGetTime(); +} diff --git a/src/application/Application.hpp b/src/application/Application.hpp new file mode 100644 index 0000000..0c0c539 --- /dev/null +++ b/src/application/Application.hpp @@ -0,0 +1,13 @@ +#ifndef ENGINE_APPLICATION_H +#define ENGINE_APPLICATION_H + +class Application { + Application() { } +public: + static int Init(); + static void Terminate(); + static void SwapInterval(int interval); + static float GetTime(); +}; + +#endif /* ENGINE_APPLICATION_H */ |