Skip to content

Commit

Permalink
Display changed a bitty
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopson97 committed Jul 28, 2017
1 parent 6fbef8c commit de25f87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
38 changes: 10 additions & 28 deletions Source/Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,24 @@ 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;
contextSettings.stencilBits = 8;
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()
{
Expand Down
2 changes: 0 additions & 2 deletions Source/Display.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class Display : public Singleton
private:
Display();

sf::ContextSettings getContextSettings();

sf::RenderWindow m_window;
};

Expand Down

0 comments on commit de25f87

Please sign in to comment.