SFML community forums

Help => Window => Topic started by: tntexplosivesltd on February 20, 2011, 10:08:19 am

Title: OpenGL Vertex Buffer Objects in SFML
Post by: tntexplosivesltd on February 20, 2011, 10:08:19 am
Hi,
How can I use VBOs in SFML? What extra stuff do I need to include (if anything).
Title: OpenGL Vertex Buffer Objects in SFML
Post by: Laurent on February 20, 2011, 10:18:53 am
What's your problem? Using VBOs, or using OpenGL in a SFML app?

There should be plenty of tutorials for the first one, and there's a tutorial and code sample for the second one ;)
Title: OpenGL Vertex Buffer Objects in SFML
Post by: tntexplosivesltd on February 20, 2011, 10:28:04 am
The problem isn't knowing how to use VBOs.
Well, when I use glGenBufferARB(), I get a "glGenBufferARB was not declared in this scope" error. Does SFML not include them when it includes OpenGL? What else do I need to link against/include?
I am only including SFML/Window.hpp and SFML/Graphics.hpp.
Title: OpenGL Vertex Buffer Objects in SFML
Post by: Laurent on February 20, 2011, 10:31:15 am
Here you are using extensions, so you must handle them explicitely, they are not declared in the GL headers.

I suggest you use GLEW or GLEE, they can load and provide extensions automatically.
Title: OpenGL Vertex Buffer Objects in SFML
Post by: tntexplosivesltd on February 20, 2011, 10:36:26 am
Awesome, thanks!
Turns out I had GLEW installed already, just had to include it :wink: