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

Author Topic: SFML with vertex array objects  (Read 1493 times)

0 Members and 2 Guests are viewing this topic.

lmorsino

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
SFML with vertex array objects
« on: June 02, 2014, 07:16:01 pm »
Trying to get VAOs working, not succeeding, and I'm wondering if it is because of GLEW.

Basically, I try to do this:

glGenVertexArrays(1, &g_vao);
glBindVertexArray(g_vao);

This doesn't compile. I looked into it further and it seems like GLEW 1.5.0 (is this version specifically required by SFML 2.1?) doesn't support vertex arrays. When I tried

if (glewIsSupported("GL_ARB_vertex_array_object"))

...this returns false. If I upgrade to the latest version of GLEW 1.10.0, it returns true but my app crashes during rendering (presumably because SFML doesn't support 1.10.0)

Later I found this page: http://glew.sourceforge.net/log.html
...which seems to indicate vertex arrays weren't added until GLEW 1.5.1

Am I understanding this correctly? Are we simply meant to not use VAOs in SFML?

If it matters, I am on Ubuntu 13.10-64 bit with C::B, and I am not using SFML for drawing - its pure OpenGL calls.
Thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML with vertex array objects
« Reply #1 on: June 02, 2014, 08:19:48 pm »
Use whatever GLEW you want, what does it have to do with SFML?
Laurent Gomila - SFML developer

lmorsino

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: SFML with vertex array objects
« Reply #2 on: June 02, 2014, 09:46:56 pm »
Well, when I try to use GLEW 1.10 for example, I get a warning message at compile time that says

"warning: libGLEW.so.1.5, needed by libsfml-graphics.so, not found"

So this is why I think it matters to SFML. Is it needed or is it not needed?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML with vertex array objects
« Reply #3 on: June 02, 2014, 10:43:14 pm »
Ah, Linux... too bad you can't link to a newer version, although they should be binary compatible. The best solution is to recompile SFML so that it links to your more recent GLEW.
Laurent Gomila - SFML developer

 

anything