Fixed renderer flags
This commit is contained in:
parent
ed488eda85
commit
8313554444
|
@ -100,17 +100,17 @@ namespace sf
|
||||||
}
|
}
|
||||||
|
|
||||||
IWindow::IWindow(Vector2u size, Vector2i position, std::string title,
|
IWindow::IWindow(Vector2u size, Vector2i position, std::string title,
|
||||||
Uint32 flags /*= SDL_WINDOW_RESIZABLE*/) :
|
Uint32 windowFlags /*= SDL_WINDOW_RESIZABLE*/, Uint32 renderFlags /*= SDL_RENDERER_SOFTWARE*/) :
|
||||||
m_pWindow(nullptr), m_pRenderer(nullptr), m_oEvent(),
|
m_pWindow(nullptr), m_pRenderer(nullptr), m_oEvent(),
|
||||||
m_oSize(size), m_oPosition(position), m_strTitle(title), m_uFlags(flags),
|
m_oSize(size), m_oPosition(position), m_strTitle(title), m_uWindowFlags(windowFlags),
|
||||||
m_pCurrentScreen(nullptr)
|
m_uRenderFlags(renderFlags), m_pCurrentScreen(nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IWindow::MessageLoop()
|
void IWindow::MessageLoop()
|
||||||
{
|
{
|
||||||
Create(m_oSize, m_oPosition, m_strTitle, m_uFlags);
|
Create(m_oSize, m_oPosition, m_strTitle, m_uWindowFlags, m_uRenderFlags);
|
||||||
|
|
||||||
// Test if the user instance's creation succeeded
|
// Test if the user instance's creation succeeded
|
||||||
if (!OnCreate())
|
if (!OnCreate())
|
||||||
|
|
|
@ -31,7 +31,8 @@ namespace sf
|
||||||
void SwitchScreen(IScreen* screen);
|
void SwitchScreen(IScreen* screen);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
IWindow(Vector2u size, Vector2i position, std::string title, Uint32 flags = SDL_WINDOW_RESIZABLE);
|
IWindow(Vector2u size, Vector2i position, std::string title,
|
||||||
|
Uint32 flags = SDL_WINDOW_RESIZABLE, Uint32 rendererFlags = SDL_RENDERER_SOFTWARE);
|
||||||
|
|
||||||
virtual bool OnCreate() { return true; }
|
virtual bool OnCreate() { return true; }
|
||||||
virtual void OnClose() { }
|
virtual void OnClose() { }
|
||||||
|
@ -52,7 +53,7 @@ namespace sf
|
||||||
Vector2u m_oSize;
|
Vector2u m_oSize;
|
||||||
Vector2i m_oPosition;
|
Vector2i m_oPosition;
|
||||||
std::string m_strTitle;
|
std::string m_strTitle;
|
||||||
Uint32 m_uFlags;
|
Uint32 m_uWindowFlags, m_uRenderFlags;
|
||||||
|
|
||||||
IScreen* m_pCurrentScreen;
|
IScreen* m_pCurrentScreen;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue