SFML community forums
Help => Window => Topic started by: BananaDarras on February 14, 2013, 03:39:27 pm
-
Hi all! I was wondered how to draw sprites with SFML 2.0, as the window class does not contain a draw function like 1.6, and many tutorials for 2.0 say it does. Thanks.
-
As in SFML 1.6, you must use a sf::RenderWindow, not a sf::Window.
-
as the window class does not contain a draw function like 1.6
And how would you've deduced this? Did you're "intelligent" part of your IDE "tell" you this?
Take a look at the example in the documentation (http://www.sfml-dev.org/documentation/2.0/), make sure your environment is setup correctly and never trust "intelligent" code look up things, but only trust your compiler.
-
As in SFML 1.6, you must use a sf::RenderWindow, not a sf::Window.
Thanks, I didn't know that you had to use sf::RenderWindow.
And how would you've deduced this? Did you're "intelligent" part of your IDE "tell" you this?
I am using VS2010 and it said the window.draw() didn't exist even when I tried to compile it, it ends up I had to use sf::RenderWindow instead of sf::Window. I didn't realize that :-\
Thanks for the help.
-
I am using VS2010 and it said the window.draw() didn't exist even when I tried to compile it, it ends up I had to use sf::RenderWindow instead of sf::Window. I didn't realize that :-\
Hasn't been different in SFML 1.6 and all the examples you can find use a sf::RenderWindow. ;)