Better handling of OpenGL errors when dealing with VBOs