Hello,
First thanks for taking a look into it.
I tried Rosme solution, but I was pretty convinced it wouldn't help. Sure I had no decent way to close my app, but Alt+F4 should have done the trick. Plus Ctrl+Alt+Del should have brought up the Task Manager. But it doesn't. Anyway I tried it, and here is my code.
#include <SFML/Graphics.hpp>
int main()
{
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window" , sf::Style::Fullscreen );
// Create a graphical text to display
sf::Text text("Hello SFML", sf::Font::getDefaultFont(), 50);
// Start the game loop
while (window.isOpen())
{
// Process events
sf::Event event;
while (window.pollEvent(event))
{
// Close window : exit
/* if (event.type == sf::Event::Closed)
window.close();
*/
if(event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape)
window.close();
}
// Clear screen
window.clear(sf::Color(200,200,128));
// Draw the string
window.draw(text);
// Update the window
window.display();
}
return EXIT_SUCCESS;
}
But the same problem happens.
I'll try to describe my problem a little bit better. When I launch that application, the screen turns completely black. And there's no reaction whatsoever to any mouse / keyboard input I do. So I "guess" the program crashes, but I don't see any confirmation of this. The only way out is the reset button of my desktop.
When I say I could only debug till that line, I meant that executing this last line, the screen turns completely black, and I can't go back to the debugger. I tried Alt+Tab, Alt+Esc and Alt+F4 and finally Alt+Ctrl+Del. But I'm still sitting in front of a black screen. So I have to reboot my computer.
This is rather cumbersome, because I don't see how to find out what's wrong, as I can't see anything.
Otherwise if I comment out the sf::Style::Fullscreen, I can successfully run the app in window mode. The background is greenish and I can red a white Hello SFML in the top left corner.
My config is : Intel i7-2600K using its on board graphic chip HD Graphics 3000. RAM : 8 Go. OS : Windows 7 64 bits.
PS : Nobody answered this, but I suppose the minimal code I provided works perfectly on other machines... ?