Good morning at all.
I've a little question about the RenderWindow.
There is a way to not display it after created, but only when i want?
The code i use is this :
sf::VideoMode mode;
sf::ContextSettings settings;
mode.Width = 1280;
mode.Height = 720;
mode.BitsPerPixel = 32;
settings.DepthBits = 24;
settings.StencilBits = 8;
settings.AntialiasingLevel = 2;
settings.MajorVersion = 3;
settings.MinorVersion = 3;
sf::RenderWindow App(mode, "SFML OpenGL - Render Window Test", sf::Style::Default, settings);
App.Show(false);
if(GLEW_OK != glewInit())
{
std::cout << "Cannot initialize GLEW context" << std::endl;
sf::Sleep(2.5f);
return EXIT_FAILURE;
}
if(!glewIsSupported("GL_ARB_vertex_buffer_object"))
{
std::cout << "VBO Is not supported, go get yourself a real graphics card" << std::endl;
sf::Sleep(2.5f);
return EXIT_FAILURE;
}
int glVersion[2] = { -1, -1 };
glGetIntegerv(GL_MAJOR_VERSION , &glVersion[0]);
glGetIntegerv(GL_MINOR_VERSION , &glVersion[1]);
std::cout << "Currently using OpenGL " << glVersion[0] << "." << glVersion[1] << std::endl;
thor::StopWatch stopWatch;
GLShaderProgram background;
if(!background.Initialize("", ""))
{
sf::Sleep(5.0f);
return EXIT_FAILURE;
}
App.Show(true);
now, as you can see, i've use an App.Show(false) after the creation, but i can see it "be created and hidden".
It's a thing that i don't want.
How can i do?
Best Regards
Davide Galli