Help => Graphics => Topic started by: solver on July 23, 2012, 08:42:54 pm
Title: Drawing sprites on screen issue [SOLVED]
Post by: solver on July 23, 2012, 08:42:54 pm
Hello. I have a question: what method i must use to put sprites on screen? I know 3:
Draw sprites on texture, and then draw texture on screen
Draw by passing main "sf::RenderWindow App" into MyClass::Draw (sf::RenderWindow &App)
Inheritance of the sf::Drawable class by MyClass, and drawing it by common way
I have not found the answer on the forum and other websites. Sorry for my english. Thanks.
Title: Re: Drawing sprites on screen issue
Post by: eXpl0it3r on July 23, 2012, 08:47:13 pm
What exactly is your problem? You draw a sprite by calling window.draw(sprite); as it is documented in every graphical example (e.g. here (http://www.sfml-dev.org/documentation/2.0/)).
Title: Re: Drawing sprites on screen issue
Post by: solver on July 23, 2012, 09:59:51 pm
Ok. For example, I want to draw grid and I want to use function to do this job. At the first time I use this: