Guest User

Untitled

a guest
Oct 21st, 2012
52
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <SFML/Window.hpp>
  2.  
  3. int main() {
  4.     // This window works.
  5.     sf::Window window( sf::VideoMode( 800, 600 ), "Test", sf::Style::Default, sf::ContextSettings( 0, 0, 0, 4, 2 ) );
  6.  
  7.     // Display the window.
  8.     window.display();
  9.  
  10.     // Let the window sit for a bit.
  11.     sf::sleep( sf::seconds( 5 ) );
  12.  
  13.     // Close the window.
  14.     window.close();
  15.  
  16.     // This window fails.
  17.     window.create( sf::VideoMode( 800, 600 ), "Test", sf::Style::Default, sf::ContextSettings( 0, 0, 0, 4, 3 ) ); // Crashes on this line.
  18.  
  19.     // Display the window.
  20.     window.display();
  21.  
  22.     // Let the window sit for a bit.
  23.     sf::sleep( sf::seconds( 5 ) );
  24.  
  25.     // Close it.
  26.     window.close();
  27.  
  28.     // Exit.
  29.     return 0;
  30. }
RAW Paste Data