OS: Mac OS X 10.7.3
SFML: Not sure about the SFML version. I downloaded the RC version from the main website about 4 days ago.
This is the most basic thing ever. Put it in a main function and you're done.
int w = 640;
int h = 480;
sf::RenderWindow * app = new sf::RenderWindow(sf::VideoMode(w, h, 32), "Test", sf::Style::Close | sf::Style::Fullscreen);
while (app->isOpen())
{
sf::Event Event;
while (app->pollEvent(Event))
{
if (Event.type == sf::Event::KeyPressed && Event.key.code == sf::Keyboard::Escape)
{
app->close();
}
}
app->clear(sf::Color(64,128,64, 255));
sf::RectangleShape shape;
shape.setFillColor(sf::Color(255,128,128, 255));
// Shape in the middle
shape.setOutlineThickness(0);
shape.setSize(sf::Vector2f(w - 100, h - 100));
shape.setPosition(w/2 - (w - 100) / 2, h/2 - (h - 100) / 2);
app->draw(shape);
// Shape in the bottom-left corner
shape.setSize(sf::Vector2f(50, 50));
shape.setPosition(0, h - 50);
app->draw(shape);
// Shape in the top-left corner
shape.setSize(sf::Vector2f(50, 50));
shape.setPosition(0, 0);
app->draw(shape);
// Shape in the bottom-right corner
shape.setSize(sf::Vector2f(50, 50));
shape.setPosition(w - 50, h - 50);
app->draw(shape);
// Shape in the top-right corner
shape.setSize(sf::Vector2f(50, 50));
shape.setPosition(w - 50, 0);
app->draw(shape);
// Shape on the left edge
shape.setFillColor(sf::Color(128,128,255, 255));
shape.setSize(sf::Vector2f(50, 50));
shape.setPosition(0, h/2 - 25);
app->draw(shape);
// Shape on the right edge
shape.setFillColor(sf::Color(128,128,255, 255));
shape.setSize(sf::Vector2f(50, 50));
shape.setPosition(w - 50, h/2 - 25);
app->draw(shape);
app->display();
}
Trying out on this simple project I get very weird results. It's no longer the bottom-left section ... most of the time I don't see anything at all.
(I resized the larger images to fit the forum)
640 x 480 windowed mode:
640 x 480 full-screen mode. I don't see anything ... don't know how that's even possible.
Same with 800 x 600. I don't see anything in full screen.
1024 x 768 full-screen mode. Something has appeared.
1280 x 800 full-screen mode. The blue bits have appeared.
Something more arbitary ... 1280 x 1200. This appears to be running in 1920 x 1200 actually, because there is no scaling and everything is pixel pefect.
Native resolution 1920 x 1200 in full-screen mode
I tried with both the dylibs and framework files. No difference.
When running the test app fullscreen in 640 x 480 on a co-workers Macbook Pro (OS 10.7.4, native resolution 1440 x 900) I see this:
Hopefully this helps. Not sure what else I can say.