Visualizer/src/Application.hpp

35 lines
740 B
C++
Raw Normal View History

2021-12-20 03:31:44 +00:00
#pragma once
#include <string>
struct GLFWwindow;
class Application
{
/////////////////////////////////////////////////////////
////// SINGLETON BOILERPLATE ////////////////////////////
/////////////////////////////////////////////////////////
public:
static Application& Instance()
{
static Application app;
return app;
}
private:
Application() = default;
~Application();
Application(const Application& other) = delete;
/////////////////////////////////////////////////////////
////// APPLICATION IMPLEMENTATION ///////////////////////
/////////////////////////////////////////////////////////
public:
void Init(int width, int height, const std::string& title);
void Launch();
private:
GLFWwindow* window = nullptr;
};