basic glfw app setup
This commit is contained in:
commit
eed4eec20c
8 changed files with 137 additions and 0 deletions
35
src/Application.hpp
Normal file
35
src/Application.hpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue