Advertisement
Guest User

main.cpp

a guest
Mar 25th, 2014
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include<SFML\Graphics.hpp>
  2.  
  3. #include "sectioned_skewable.h"
  4.  
  5. int main()
  6. {
  7.     sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!");
  8.  
  9.     sf::Texture* quadtexture = new sf::Texture;
  10.     quadtexture->loadFromFile("image.gif");
  11.  
  12.     SectionedSkewable testquad(500,500,2);
  13.  
  14.     testquad.setTexture(quadtexture,true);
  15.  
  16.     while (window.isOpen())
  17.     {
  18.  
  19.         sf::Event event;
  20.         while (window.pollEvent(event))
  21.         {
  22.             if (event.type == sf::Event::Closed)
  23.                 window.close();
  24.         }
  25.  
  26.         window.clear(sf::Color::Magenta);
  27.         window.draw(testquad);
  28.         window.display();
  29.     }
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement