Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. static void Main(string[] args)
  2. {
  3. Image i = RenderSet(640, 480, 1.5f, new Vector2f(-0.5f, 0f));
  4. i.SaveToFile("C:\\Users\\Lauri\\OneDrive\\Desktop\\test3.bmp");
  5.  
  6. app = new RenderWindow(new VideoMode(640, 480), "My Window");
  7. app.SetFramerateLimit(60);
  8. Texture t = new Texture(i, new IntRect(new Vector2i(0, 0), new Vector2i(640, 480)));
  9.  
  10. Sprite s = new Sprite(t);
  11. s.TextureRect = new IntRect(new Vector2i(0, 0), new Vector2i(640, 480));
  12. s.Position = new Vector2f(0, 0);
  13.  
  14.  
  15. while (app.IsOpen)
  16. {
  17. app.Closed += new EventHandler(WindowClose);
  18. app.DispatchEvents();
  19. app.Clear();
  20. app.Draw(s);
  21. app.Display();
  22.  
  23. }
  24.  
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement