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

Author Topic: Toggle Resize between different video modes  (Read 3164 times)

0 Members and 1 Guest are viewing this topic.

brainydexter

  • Newbie
  • *
  • Posts: 5
    • Yahoo Instant Messenger - fly2priyank@yahoo.com
    • View Profile
    • http://cghost.origo.ethz.ch/blog
Toggle Resize between different video modes
« on: March 25, 2008, 10:42:24 am »
Hi..

Am still new to SFML and am trying to achieve the following:

Have this feat as an option in video modes:

- 800 by 600
- 1024 by 768
etc

Can any1 please suggest me as to how to go about it?

The scenario is simple..I have a 2d map array kind of a thing and an image of 32 by 32 that is to be displayed on the screen, concurrent with the 2d map array. My problem is, for the same 2d array extents..how do i manipulate the display??

If my post sounds obscure..(Im just thinking aloud..so it might!)..pls let me know..

Thanks  :)
Daamn..I broke it again~

Avency

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Toggle Resize between different video modes
« Reply #1 on: March 25, 2008, 11:20:07 am »
Maybe I didn't get you right, but sf::RenderWindow::SetView could be what you are looking for.
If you want to have a 320*240 screen diplayed in a 640*480 window, you could just
write something like:

Code: [Select]

 sf::RenderWindow App(sf::VideoMode(640, 480), "ViewExample");
 sf::View View(sf::FloatRect(0, 0, 320, 240));
App.SetView(&View);


Hope that helps.