Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Resize window 2x  (Read 3115 times)

0 Members and 1 Guest are viewing this topic.

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 190
    • View Profile
Resize window 2x
« on: June 17, 2010, 02:52:17 pm »
Is there a way to resize a 640x480 window to 2x the size?
I just want it to be a graphical resize, no effect on gameplay whatsoever.

Think about pixel-art games that run at 320x240, but you can upscale them at 3x, 4x. That's what I'm looking for.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Resize window 2x
« Reply #1 on: June 17, 2010, 03:41:15 pm »
There's nothing particular to do, just resize your window and SFML will do the job.
Laurent Gomila - SFML developer

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 190
    • View Profile
Resize window 2x
« Reply #2 on: June 17, 2010, 10:48:09 pm »
Great, it works fine :)

What if I need to display it at a widescreen resolution by adding black bars?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Resize window 2x
« Reply #3 on: June 17, 2010, 10:54:26 pm »
You can control the size (and thus the aspect ratio) using sf::View.
Laurent Gomila - SFML developer