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

Author Topic: OpenGL Vertex Buffer Objects in SFML  (Read 3664 times)

0 Members and 1 Guest are viewing this topic.

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
OpenGL Vertex Buffer Objects in SFML
« 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).

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
OpenGL Vertex Buffer Objects in SFML
« Reply #1 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 ;)
Laurent Gomila - SFML developer

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
OpenGL Vertex Buffer Objects in SFML
« Reply #2 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
OpenGL Vertex Buffer Objects in SFML
« Reply #3 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.
Laurent Gomila - SFML developer

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
OpenGL Vertex Buffer Objects in SFML
« Reply #4 on: February 20, 2011, 10:36:26 am »
Awesome, thanks!
Turns out I had GLEW installed already, just had to include it :wink:

 

anything