class SFML::VertexBuffer

GPU-resident vertex buffer. Same shape as VertexArray but the vertices live in video memory, so a draw call only ships an index/handle instead of re-uploading the geometry every frame. Useful for static meshes, large tilemaps, particle systems with mostly-static positions.

buf = SFML::VertexBuffer.new( vertices, primitive_type: :triangles, usage: :static, ) window.draw(buf)

Update later (full or partial):

buf.update(new_vertices) # full replace buf.update(some_vertices, offset: 32) # patch in place

If the GPU doesn’t support OpenGL vertex buffer objects, SFML::VertexBuffer.available? returns false and you should fall back to VertexArray.