Advertisement
Guest User

Untitled

a guest
Oct 21st, 2012
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement