Hi,
In the last days I've been working on using the OpenGL vertex buffer objects
extension for IWineD3DVertexBuffer. The aims of this were:
* Store geometry data in the hardware for more efficient rendering
* Convert the colors and rhw values on upload and get rid of drawStridedSlow
The result is in this diff, and it basically works, although not as good as
I've hoped. It gives a nice performance boost to Battlefield 1942, and is an
improvement for Half-Life 2, but it is not perfect yet. The main shortcomings
are:
* Shader support: I'm afraid that the conversion code at this points breaks
shaders. I've tested with battlefield 1942. The vertex shaders in this game
don't work correctly yet, the hands of soldiers are missing and there are
some incorrect planes with odd colors. However, with this patch the hands are
drawn as apparently random vertices all over the screen. I think I'll need a
little help from the shader people for that.
* The vertex conversion is slow, and it turned out that if the app Locks the
Buffer every frame then drawStridedSlow is faster Converting +
drawStridedSlow. Because of that VBOs and the conversion aren't used for
vertex buffers in system memory and vbs with WINED3DUSAGE_DYNAMIC are not
loaded into a vbo.
* In Direct3D7 there is no way for the app to specify a range of vertices to
be locked. Because of that DX7 apps are generally slower if they update the
vertices regularily. To avoid that drawback there is no VBO created for DX7
apps if they have vertex data that needs conversion. The geometry in DX7 apps
is usually quite simple, so DrawStridedSlow isn't a big performance hit in
those apps.
Stefan