SFML community forums
Help => Graphics => Topic started by: 4B on April 14, 2014, 07:09:36 pm
-
The subject should already tell you what I want to know.
For reasons of performance, the lines can't be stored on vectors to draw them later, so I need to draw all points of a line to a sprite.
How am I supposed to do that?
Thanks.
-
You can't, but you can render everything to a render texture and use that texture as source for your sprite. ;)
For reasons of performance
Did you actually run into performance issues or are you just guessing widely that it's a performance issue?
-
We're talking about 5000+ lines(I'm programming a spirograph). I already tested it with a lines-vector and the fps went down after 2000.
I'm going to try the RenderTexture thing and tell you if I got problems.
-
We're talking about 5000+ lines(I'm programming a spirograph). I already tested it with a lines-vector and the fps went down after 2000.
"FPS went down" doesn't say much, especially if you don't add the values, since FPS are not proportional. ;)
But yes a render texture might be a possibility then.
-
Of course it won't drop exactly after 2000lines on your computer, but you wanted to know if I'm sure it leads to performance issues.
Anyway - I got it, thanks.