Hello, i have the following problem:
My game is designed to 1920x1080 screen resolutions, but in my PC the screen is 1600x900... well, i thought, it's the same aspect ratio (16:9), so i should not have problems scaling images from 1920.. to 1600... but yes!, i have problems! I attached the original image, and the scaled image, and you can see the differents.
I tried to use view, scale texture, i read N posts in this forum, etc. but ever had the same problem. My code is the following:
int main()
{
bool finish = false;
sf::RenderWindow window;
sf::Texture texture;
sf::Sprite sprite;
texture.loadFromFile("resources\\FirstBKGRND.png");
sprite.setTexture(texture);
sprite.setPosition(sf::Vector2f(0, 0));
window.create(sf::VideoMode(1600, 900, 32), "Donuts", sf::Style::Fullscreen);
sf::View view;
view.reset(sf::FloatRect(0, 0, 1920, 1080));
view.setViewport(sf::FloatRect(0.f, 0.f, 1.f, 1.f));
window.setView(view);
while (!finish)
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
finish = true;
}
window.clear(sf::Color::White);
window.draw(sprite);
window.display();
}
return 0;
}
I hope that you can help me!