Advertisement
Guest User

AL lib: ALc.c:1420: alcDestroyContext()

a guest
Nov 8th, 2011
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. #include <SFML/Audio.hpp>
  2. #include <SFML/Graphics.hpp>
  3.  
  4. int main()
  5. {
  6.     sf::Texture texture;
  7.     texture.LoadFromFile("data/1440x900.jpg");
  8.    
  9.     sf::Sprite sprite(texture);
  10.  
  11.     sf::Music music;
  12.     music.OpenFromFile("data/nice_music.ogg");
  13.        
  14.     music.Play();
  15.  
  16.     sf::RenderWindow window(sf::VideoMode(1440, 900), "SFML window"); // ,sf::Style::Fullscreen);
  17.    
  18.     while (window.IsOpened())
  19.     {
  20.         sf::Event event;
  21.         while (window.PollEvent(event))
  22.         {
  23.             if (event.Type == sf::Event::Closed)
  24.                 window.Close();
  25.         }
  26.  
  27.         window.Clear();
  28.         window.Draw(sprite);
  29.         window.Display();
  30.     }
  31.  
  32.     return EXIT_SUCCESS;
  33. }
  34.  
  35.  
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement