wined3d: Respect ARB_VERTEX_BUFFER_OBJECT in loadVertexData.

Stefan Dösinger stefandoesinger at
Sat Oct 28 07:43:18 CDT 2006

Am Samstag 28 Oktober 2006 13:31 schrieb Markus Amsler:
> Stefan Dösinger wrote:
> >> -    GLint curVBO = -1;
> >> +    GLint curVBO = GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT) ? -1 : 0;
> >
> > Strange, I thought I sent a patch like that already and it was committed
> > :-/
> You wrote it for loadNumberedArrays, I copy pasted it to loadVertexData.
> I  have to admit, I don't know exactly what I'm doing here (opengl/d3d
> newbie).
The code below checks if the VBO for the data type in the stream is the vbo 
that is currently bound. 0 means no vbo, so setting the vbo to 0 equals 
operation without vbos. There is no member checking the current vbo in the 
device, only the curvbo optimization in the loading functions(waits for 
better state management).

If vbos are not supported the vbo for each data in the stream source is always 
0. Setting curvbo to 0 if vbos aren't supported will make sure that 
the .vbo != curvbo check is always false and glBindBufferARB is never called, 
preventing the crash due to a NULL or invalid function pointer.

> But this patch lets me play Battlefield 1942 on my laptop where
> ARB_VERTEX_BUFFER_OBJECT is not supported :-)
Could it be that you have some radeon dri setup without direct rendering(using 
accelerated indirect rendering instead)? I think even a gf2 and a mach64 card 
support vertex buffers objects, so I'm kinda surprised yours does not.

Though, I also wonder why accelerated indirect rendering won't do VBOs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the wine-devel mailing list