SFML community forums

Help => Window => Topic started by: FelperOneS on November 14, 2020, 05:29:15 am

Title: how scale window
Post by: FelperOneS on November 14, 2020, 05:29:15 am
I want my window to be 320x240 full screen resolution.
When running the application, the game seems very small.
I want the game to fill the entire monitor screen without changing the resolution, just scaling.
no black bars.
how to do it? thanks
Title: Re: how scale window
Post by: G. on November 14, 2020, 08:16:32 am
Use an sf::View of size 320*240, its content will be stretched to whatever your window size is.
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1View.php
https://www.sfml-dev.org/tutorials/2.5/graphics-view.php
Title: Re: how scale window
Post by: FelperOneS on November 15, 2020, 12:50:32 am
i dont understand how implement this in the code
Title: Re: how scale window
Post by: Hapax on November 17, 2020, 01:20:36 pm
As part of the tutorial linked above, see https://www.sfml-dev.org/tutorials/2.5/graphics-view.php#defining-what-the-view-views

You will likely want a view that starts at (0, 0) with a size of 320x240, right?