d3dx8 [patch 1/10] Implement D3DXPlaneFromPointNormal
stefandoesinger at gmx.at
Mon Nov 19 14:00:15 CST 2007
It's not really about this patch, but I am curious what the plans about
sharing code between the various d3dx?_* libraries are. I think a big amount
of functionality can be shared among d3dx8.dll, d3dx9_*.dll, and propably
d3dxof.dll and d3drm.dll.
I think this was discussed in the past, but I am not sure if there was any
outcome. The solution chosen for d3d was to create an internal library
wined3d.dll, and have the other libs call it. I guess something similar
should be done for d3dx as well.
For non COM interfaces this is pretty easy anyway. We can rename d3dx8 to
wined3dx at any time and just load the functions into a new d3d8 thunk using
the .spec file, without any C code. So I guess we can leave things as they
currently are and move over to a shared lib once non-math functions are
implemented, or someone starts d3dx9_*.dll
Functions like D3DXCreateTextureFromFileA seem to be a bit harder. Since they
take an IDirect3DDevice8 * interface pointer d3dx9 cannot use them as is.
Making a shared implementation is also not quite possible because it would
need a wined3ddevice then, but only d3d8.dll knows how to get a wined3ddevice
from a d3ddevice8. Also, d3dx* would depend on wined3d then, which is
propably not what we want.
David, do you have any plans regarding that?
As a sidenote, I really like your patches! The patches are small but still
every patch makes sense for itself, and tests in every patch :-)
I will write a HLSL compiler at some point, and propably a shader assembler.
This will be needed for a complete d3dx8 and d3dx9 implementation, as well as
d3d10. I am not yet sure where to put it, but it could be a standalone lib in
libs/, to allow using the compiler at build time, or just include it in
wined3dx, if we decide to add such a library.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20071119/7518283a/attachment.pgp
More information about the wine-devel