int main()
{
Vector2f resolution;
resolution.x = VideoMode::getDesktopMode().width;
resolution.y = VideoMode::getDesktopMode().height;
// Create and open a window for the game
RenderWindow window(VideoMode(resolution.x, resolution.y), "Timber!!!", Style::Fullscreen);
// Create a an SFML View for the main action
View mainView(sf::FloatRect(0, 0, resolution.x, resolution.y));
// Clear everything from the last frame
window.clear();
window.setView(mainView);
// Draw our game scene here
window.draw(spriteBackground);
window.display();
}
return 0;
}
I still can't figure out how to get my game example (which are 1920 x 1080) scaled to my 4k resolution. It goes full screen, but the game itself is tiny in the top left corner (most likely displaying 1920x1080) and not scaling to my desktop mode. Any help ? This has really been bugging me.