SFML community forums

Help => Graphics => Topic started by: aaroncm on January 18, 2014, 11:41:47 am

Title: Drawing onto a surface
Post by: aaroncm on January 18, 2014, 11:41:47 am
I'm not sure how to go about this, thought I'd try get a little input :)

Basically, I want to draw onto a surface, of which I can set the size and position of, which can then be drawn onto the render window buffer. I'm throwing together a small window class which I can draw stuff into, and then just move them all around at once by moving the 'surface' if such a thing is implemented?

Any help appreciated :)

Thanks
Title: Re: Drawing onto a surface
Post by: krzat on January 18, 2014, 12:07:51 pm
http://sfml-dev.org/documentation/2.1/classsf_1_1RenderTexture.php
Title: Re: Drawing onto a surface
Post by: aaroncm on January 18, 2014, 12:27:53 pm
Dunno how I missed it  :o

Thanks a lot. Solved.
Title: Re: Drawing onto a surface
Post by: Daddi on January 18, 2014, 03:01:18 pm
Quote
then just move them all around at once by moving the 'surface'

You should have a look at sf::View :)

http://www.sfml-dev.org/documentation/2.1/classsf_1_1View.php
http://dev.my-gate.net/2012/06/using-sfview/