SFML community forums
Help => Window => Topic started by: bazukas on July 09, 2012, 12:44:33 pm
-
Don't know if I should have created this topic in the graphic's or window's section but anyways here it is:
Is there a way , without resorting to OpenGL to set/change the background color of a SFML's window?
Thanks in advance and forgive any grammar errors ;D.
--bazukas
-
Depends which class (Window or RenderWindow) and which version of SFML.
-
Thanks for the quick reply Laurent.
I don't know how I forgot to provide any useful info and for that I'm sorry.
I'm using SFML 2.0 and currently working with RenderWindow class for 2D rendering.
--bazukas
-
Hello,
To change the window's background color, you can add a sf::Color argumenht to sf::RenderWindow::clear method.
http://www.sfml-dev.org/documentation/2.0/classsf_1_1RenderTarget.php#a6bb6f0ba348f2b1e2f46114aeaf60f26
-
Thanks a lot! :D