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

Author Topic: [Solved] VBO creates bug ?  (Read 4760 times)

0 Members and 1 Guest are viewing this topic.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: VBO creates bug ?
« Reply #15 on: June 03, 2017, 12:41:26 pm »
You still haven't showed us any of the actual code around your OpenGL glDraw*** commands, which I assume are somewhere in renderOpenGL(). By now it should be more or less known that popGLStates() and pushGLStates() don't take care of almost all states that were introduced in OpenGL 1.2 and later. This includes VAO and VBO bindings. If you are leaving even a single binding or something else in another state than what SFML would expect if you didn't render using OpenGL yourself, it will produce unexpected output. If you are lucky, this would only be an error, if you start to play with buffer bindings then OpenGL won't check whether the data sources it thinks are correct actually point to the correct data (how would it check if an arbitrary pointer is valid if we can't even do it ourselves?).
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Andarann

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: VBO creates bug ?
« Reply #16 on: June 03, 2017, 03:46:49 pm »
There is no problem anymore !
I have just figured that after all the SFML initialization, using a resetGLStates() on the window before initializing the OpenGL part works fine ! I don't know why, and frankly I'm too happy to care.
Thank you for your time everyone !