D3D7 -> WineD3D, 2nd attempt

Stefan Dösinger stefandoesinger at gmx.at
Sun Oct 30 07:15:56 CST 2005


> It may be possible to use the feedback buffer and get OpenGL to do all the
> work
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/glf
> The majority of the math is fairly simple matrix transforms, OpenGL
> extensions usually have all the math required.
> http://oss.sgi.com/projects/ogl-sample/registry/
The feedback buffers are definitly interesting here.
I've noticed that the D3D7 IDirect3DVertexBuffer7::ProcessVertices and D3D9 
IDirect3DDevice9::ProcessVertices are very similar, but they have a few 
While the D3D9 funktion is related to hardware vertex shaders, the D3D7 
funktion does it's job explicitly in software(according to the DX7 sdk). The 
reason is that vertex shaders were simply not available in when DX7 came out.

The calculations that DX7's ProcessVertices can perform are clipping, 
lighting, some extent thing and transforming the vertices. Most things (or 
all) can be done with OpenGL extentions and Vertex shaders. However, I'd 
suggest a software implementation for DX7 as a fallback for cards which don't 
have shaders and cards which don't have the necessary extensions.

I have to read the data locations from the vertex buffers to do anything with 
them. Can I do the following:
SetStreamSource(Input VB);
SetStreamSource(Output VB);
primitiveConvertToStridedData(output strided);

// Do calculations

/*SetStreamSource(NULL) if necessary */

Is this possible, or will it cause problems?

> 1.5fps seems very slow, even for DrawStridedSlow but DrawStridedSlow will
> be superseded as soon as the colour fixups are in place.
I guess this happens because I am poking completely senseless values into 
drawPrimitive, like sensless colors and texture coordinates. The numbers are 
not 0, as I thought first.


More information about the wine-devel mailing list