From: Mike C. Fletcher <mcfletch@vr...> - 2009-03-05 14:03:49
Ontje Lünsdorf wrote:
> I'm trying to use vertex buffer object on a laptop with an intel 82855 graphic
> chipset. GL_EXTENSIONS contains GL_ARB_vertex_buffer_object and GLView reports
> that the glGenBuffers function should be available.
> If I try to call the function PyOpenGL will raise the a NullFunctionError.
> However if I don't specify the buffer count PyOpenGL will complain about a
> missing argument for that function.
> The same code runs without any problems on a machine with a nvidia card.
> Is this a PyOpenGL, driver bug or am I missing something?
Are you calling glGenBuffersARB, or glGenBuffers ? Your driver likely
only provides the extension-based entry point (the one with the ARB
suffix). See the OpenGL/arrays/vbo.py module for some code showing use
of the "alternate" function to make using promoted extensions easier.
Oh, it also provides a basic VBO wrapper as an array data-type.
Mike C. Fletcher
Designer, VR Plumber, Coder
Am Donnerstag 05 März 2009 15:04:54 schrieb Mike C. Fletcher:
> Are you calling glGenBuffersARB, or glGenBuffers ? Your driver likely
> only provides the extension-based entry point (the one with the ARB
> suffix). See the OpenGL/arrays/vbo.py module for some code showing use
> of the "alternate" function to make using promoted extensions easier.
> Oh, it also provides a basic VBO wrapper as an array data-type.
I tried both glGenBuffersARB and glGenBuffers but without success. It seems that
glGenBuffersARB is completely not available ( bool(GL.glGenBuffersARB) raises an
AttributeError ) while calling glGenBuffers exhibits some strange behaviour:
- bool(GL.glGenBuffers) == False
- calling GL.glGenBuffers() with a wrong amount of arguments throws a
ValueError which informs about the calling signature of that method. So I
assume PyOpenGL must have gathered that information from somewhere.
- However: Checking the method availability with bool(GL.glGenBuffers) returns
False and calling the method with correct arguments throws a NullFunctionError
telling me to check for the method :)
Thanks to your suggestions I looked into the vbo.py module and used the
vertex_buffer_object from PyOpenGL.GL.ARB directly. This module exposes the
*ARB variants of those methods and guess what: Those work as expected! Thank
Is the vertex_buffer_object module the preferred way of using this extension?