Adding two code paths for the OpenGL buffer functions

Issue #489 resolved
created an issue

The current VBO class for the VertexBuffer uses the ARB buffer functions exclusively (with one exception). Even though most implementations probably implement the ARB extension, the OpenGL specification does not require them to do so. This can lead to problems if a driver decides to stop supporting it.

There's also a major issue with the glDeleteBuffers call which is not a ARB function and makes drivers with an OpenGL version older than 1.5 crash hard.
Edit1: This was fixed with a recent commit.

I propose adding a loading strategy similar to the one used for framebuffers, but in this case it's merely function forwarding. See the vbostrategy branch on love-experiments. For those who have write access, feel free to make changes if you spot something that needs fixing, even if just cosmetic.

Comments (3)

  1. Alex Szpakowski

    Since the API is exactly the same, another option would be to directly assign the function pointers of the core glBuffer* functions to the names of the ARB versions, if the ARB versions are not supported but GL 1.5+ is (the Ogre3D rendering engine uses this method.)

  2. Log in to comment