Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Faster drawing for multiple shapes
Print
Pages: [
1
]
Author
Topic: Faster drawing for multiple shapes (Read 5171 times)
0 Members and 1 Guest are viewing this topic.
-Nautilus-
Newbie
Posts: 6
Faster drawing for multiple shapes
«
on:
August 23, 2016, 03:17:04 am »
I have to draw alot of times the same set of shapes, and i would like to know if there is a way to group those together so that i would only need to perform grouping once and that i could draw that on a RenderWindow faster.
Logged
DarkRoku12
Full Member
Posts: 203
Lua coder.
Re: Faster drawing for multiple shapes
«
Reply #1 on:
August 23, 2016, 06:17:56 am »
You can use the
sf::VertexArray
class.
Hope you achieve what you are trying to do.
Logged
I would like a spanish/latin community...
Problems building for Android? Look here
-Nautilus-
Newbie
Posts: 6
Re: Faster drawing for multiple shapes
«
Reply #2 on:
August 25, 2016, 02:50:19 am »
Ok thanks.
Still 1 question: imagine i have to draw the same shape/whatever alot (rly alot) of times.
what option would be faster: Shape or VertexArray?
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11032
AW: Faster drawing for multiple shapes
«
Reply #3 on:
August 25, 2016, 09:27:21 am »
With draw a lot I assume you mean at different locations, right? Just add all the shapes to the vertex array.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Faster drawing for multiple shapes