The recent include/wine/wined3d_types.h changes
Oliver Stieber
oliver_stieber at yahoo.co.uk
Fri Aug 26 12:28:19 CDT 2005
--- Gerald Pfeifer <gerald at pfeifer.com> wrote:
> The following patch to include/wine/wined3d_types.h
>
> triggers the following warning in IDirect3D8Impl_CreateDevice():
>
> directx.c:670: warning: assignment from incompatible pointer type
> directx.c:678: warning: assignment from incompatible pointer type
>
Ok, I'll send in a patch to fix this.
>
> Both D3DFORMAT and WINED3DFORMAT are enums, so indeed assigning one
> to the other seems a bit strange, if not dangerous. Is the change
> as such really correct?
The problem is that Microsoft changes what D3DFORMAT are valid between Direct3D releases, DirectX
9 is missing some formats that are in DirectX 8 and DirectX 8 is missing some formats that are in
DirectX 9.
To work around this a new enum WINED3DFORMAT was created that includes all the types valid for
DirectX 8 as well as those valid for DirectX 9. Because DirectX 8/9's D3DFORMATs are a subset of
WINED3DFORMAT DirectX 8/9's D3DFORMAT can be cast to WINED3DFORMAT without any problems.
Texture states are similar to this, except that when DirectX 8 is moved over to using wined3d a
switch will be required to send those states that are sampler states in DirectX 9 to wined3d
SetSamplerState instead of SetTextureStageState.
>
> Gerald
>
>
___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
More information about the wine-devel
mailing list