SFML community forums
Help => Graphics => Topic started by: Hey on September 06, 2019, 07:39:47 pm
-
Hello everyone, I am trying to draw around 10,000 points. So instead of calling window.draw(...) 10,000 times I was thinking of putting into a vertex array, and drawing with single draw call.
But how can I increase the point size? I know the OpenGL function that does this, which is glPointSize(...). But is there another way?
Here is a example image: https://imgur.com/Va6GYXK (https://imgur.com/Va6GYXK)
-
You can use quads instead of points.
-
SFML doesn't let you draw bigger points directly.
Multiple options:
- sf::VertexArray: Draw triangles or quads if the shape is ok
- sf::VertexArray: Draw multiple points per point
- sf::VertexArray: Use a texture for a point, and draw it with quads (4 vertices per point)
- sf::RenderTexture, sf::Texture, sf::Sprite: Draw the points once to a render texture, build a sprite from it and draw that