SFML community forums
Help => Graphics => Topic started by: exafi on March 10, 2012, 01:11:59 am
-
Here I put a code.
I am sorry my english is very bad
unsigned int _WIDTH=840;
unsigned int _HEIGHT=640;
sf::View _CAMARA(sf::FloatRect(0, 0, _WIDTH, _HEIGHT));
sf::RenderWindow app(sf::VideoMode(_WIDTH,_HEIGHT,32),"Window RULZ . By xafi");
//##############################################
if(app.GetWidth()!=_WIDTH || app.GetHeight()!=_HEIGHT){
_WIDTH=app.GetWidth();
_HEIGHT=app.GetHeight();
_CAMARA.SetFromRect(sf::FloatRect(0, 0, _WIDTH, _HEIGHT));
app.SetView(_CAMARA);
}
//##############################################
-
And your problem?
By the way, you shouldn't use identifiers like _WIDTH, as they are reserved for compiler and implementation. Use WIDTH, width or Width.
-
is a contribution xD