Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML RenderWindow do not display it when created  (Read 1921 times)

0 Members and 1 Guest are viewing this topic.

Revan1985

  • Newbie
  • *
  • Posts: 4
    • MSN Messenger - davide_galli_420@hotmail.it
    • View Profile
SFML RenderWindow do not display it when created
« on: April 22, 2011, 11:36:58 am »
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 :

Code: [Select]

        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
Best Regards
    Davide Galli

* - junior c# programmer
* - base c++/opengl programmer
* - near having a motorbike.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML RenderWindow do not display it when created
« Reply #1 on: April 22, 2011, 12:01:59 pm »
Quote
There is a way to not display it after created, but only when i want?

No, but that would be cool ;)

It will probably be added for SFML 2.0 or 2.x.
Laurent Gomila - SFML developer

 

anything