I am testing high dpi resolution on a macbook pro retina. Windowed mode works great but I noticed that resolutions lower than desktop show up with a border in fullscreen. The window pixel size is accurate but does not scale to cover the full screen.
The following valid resolutions are affected:
- 2560 x 1600
- 1680 x 1050
- 1440 x 900
- 1280 x 800
Here's a small complete program to reproduce the problem provided you can test on a macbook pro retina. You will see a white rectangle that matches windows size yet does not take the whole screen.
#include <SFML/Graphics.hpp>
int main(int, char const**)
{
sf::RenderWindow window(sf::VideoMode(1680, 1050), "SFML window", sf::Style::Fullscreen);
sf::RectangleShape shape;
shape.setSize(sf::Vector2f(1680, 1050));
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::KeyPressed) {
window.close();
}
}
window.clear();
window.draw(shape);
window.display();
}
return EXIT_SUCCESS;
}
I have compiled SFML from the latest github code and testing on osx 10.9.4. The display settings are set to default "best for display".
Is this intended behavior? is it possible to make the lower resolution scale to fullscreen? of course the fullscreen window size is fine at the native 2880x1800 but it does take hit on performance.