From de25f87838f3600f9559b3f4fc149a46258a9b4e Mon Sep 17 00:00:00 2001 From: Hopson97 Date: Fri, 28 Jul 2017 10:30:47 +0100 Subject: [PATCH] Display changed a bitty --- Source/Display.cpp | 38 ++++++++++---------------------------- Source/Display.h | 2 -- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/Source/Display.cpp b/Source/Display.cpp index 8de6a1b..276c4e0 100755 --- a/Source/Display.cpp +++ b/Source/Display.cpp @@ -12,20 +12,6 @@ Display& Display::get() } Display::Display() -: m_window { sf::VideoMode::getDesktopMode(), - "HopsonCraft - 'V4'", - sf::Style::Fullscreen, - getContextSettings() - } -{ - glewInit(); - glewExperimental = GL_TRUE; - glViewport(0, 0, getRaw().getSize().x, getRaw().getSize().y); - - glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -} - -sf::ContextSettings Display::getContextSettings() { sf::ContextSettings contextSettings; contextSettings.depthBits = 24; @@ -33,21 +19,17 @@ sf::ContextSettings Display::getContextSettings() contextSettings.antialiasingLevel = 0; contextSettings.majorVersion = 3; contextSettings.minorVersion = 3; - /* - return sf::ContextSettings - { - 24, //Depth Bits - 8, //Stencil Bits - 0, //Anti Alias Level - 3, //OpenGL Major Version - 3, //OpenGL Minor Version - sf::ContextSettings::Attribute::Default, //Attribute Flag - false //sRGB Capable - }; - */ - return contextSettings; -} + m_window.create(sf::VideoMode::getDesktopMode(), + "HopsonCraft", + sf::Style::Fullscreen, + contextSettings); + glewInit(); + glewExperimental = GL_TRUE; + glViewport(0, 0, getRaw().getSize().x, getRaw().getSize().y); + + glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); +} void Display::close() { diff --git a/Source/Display.h b/Source/Display.h index 4408cef..a1c831b 100755 --- a/Source/Display.h +++ b/Source/Display.h @@ -29,8 +29,6 @@ class Display : public Singleton private: Display(); - sf::ContextSettings getContextSettings(); - sf::RenderWindow m_window; };