Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Vertex Arrays - Dynamic?  (Read 1450 times)

0 Members and 1 Guest are viewing this topic.

Inspector Coarse

  • Newbie
  • *
  • Posts: 4
    • View Profile
Vertex Arrays - Dynamic?
« on: July 09, 2015, 05:18:51 pm »
In dx we have static buffers and dynamic buffers. If you want to make per frame updates to the verts you'd go with the dynamic, is this how it is done with sfml/opengl? I want to reduce draw calls as much as possible and dynamic buffers for the geometry would rock.

kitteh-warrior

  • Guest
Re: Vertex Arrays - Dynamic?
« Reply #1 on: July 09, 2015, 05:51:38 pm »
Quote from: Inspector Coarse
If you want to make per frame updates to the verts you'd go with the dynamic, is this how it is done with sfml/opengl?

I'm sure if you look at the official tutorials, you would figure out that this is not how SFML works.

Quote from: Inspector Coarse
I want to reduce draw calls as much as possible and dynamic buffers for the geometry would rock.

This and this contain the information you want. This contains information that are commonly asked questions (one of which being about FPS count plummeting due to too many draw calls).

If the documentation is not enough for you to understand what sf::VertexArray has, the source code has all information of it (which you will find it is a simple wrapper around std::vector<sf::Vertex>).