Files
Aeon/Aeon/Core/Display.hpp
Benjamin Kyd 430e3e5e69 yes
2022-06-05 01:05:56 +01:00

60 lines
1.0 KiB
C++

#ifndef AEON_CORE_DISPLAY_H_
#define AEON_CORE_DISPLAY_H_
#include <string>
#include <SDL.h>
extern "C" {
#include <ThirdParty/glad.h>
}
#include "Aeon/Rendering/RenderMaster.hpp"
#include "Aeon/Core/EngineConfig.hpp"
#include "Aeon/Core/Events.hpp"
using namespace Rendering;
namespace Core {
class Display : public EventListener
{
public:
Display();
~Display();
bool Create( const DisplayProperties& properties );
const unsigned int GetWidth();
const unsigned int GetHeight();
const SDL_Window* GetWindow();
const SDL_GLContext& GetContext();
void SetClearColour( float r, float g, float b, float a = 1.0f );
void EndFrame();
void Destroy();
bool EventRecieved( GenericEvent& e ) override;
private:
SDL_Window* mWindow;
SDL_GLContext mContext;
RenderMaster& mRenderer;
unsigned int mWidth, mHeight = 0;
unsigned int mX, mY = 0;
float mClearColour[4];
private:
Display( Display const& ) = delete;
void operator=( Display const& ) = delete;
};
}
#endif