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

Author Topic: Fullscreen without resizing  (Read 2430 times)

0 Members and 3 Guests are viewing this topic.

Mossar

  • Newbie
  • *
  • Posts: 15
    • View Profile
Fullscreen without resizing
« on: February 23, 2013, 01:44:13 pm »
I'm just curious about doing something like that:

I've got game project and it's 800px:600px.
I wanted to make it more "professional" and make this game fullscreened.
Normal fullscreening resize my project and it fits to my current system resolution.

And there is a question: is it possible to fullscreen a window without resizing? Just 800:600 game in the middle of the screen surrounded with black colour? Of course I can draw my background texture with black colour around background but I'm just curious is there option to do what I want.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Fullscreen without resizing
« Reply #1 on: February 23, 2013, 01:52:38 pm »
1. Create a window with the desktop's resolution (see sf::VideoMode) in fullscreen mode.
2. Setup a view with a viewport that only fills 800x600 pixels in the middle of your screen.
3. Render to that view.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Mossar

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Fullscreen without resizing
« Reply #2 on: February 23, 2013, 02:44:24 pm »
Haha, thank your very much :)

It's funny when you create difficult methods of moving character in a game or collisions but you can't create the easiest ideas like that. I'm ashamed :D