Files
Aeon/Aeon/Core/Display.hpp
2021-08-14 22:47:15 +01:00

52 lines
822 B
C++

#ifndef AEON_CORE_DISPLAY_H_
#define AEON_CORE_DISPLAY_H_
#include <string>
#include <SDL.h>
#include <ThirdParty/glad.h>
namespace Aeon::Core {
class DisplayProperties
{
public:
std::string Name;
int Width, Height;
bool VSync;
DisplayProperties( std::string name, int width = 1200, int height = 900, bool vSync = true )
: Name( name ),
Width( width ),
Height( height ),
VSync( vSync ) { }
};
class Display
{
public:
Display();
~Display();
bool Create( const DisplayProperties& properties );
unsigned int GetWidth();
unsigned int GetHeight();
void Destroy();
private:
SDL_Window* mWindow;
SDL_GLContext mContext;
unsigned int mWidth, mHeight;
private:
Display( Display const& ) = delete;
void operator=( Display const& ) = delete;
};
}
#endif