SFML community forums
Help => Window => Topic started by: Mossar 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.
-
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.
-
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