Commit 7ca369d9 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw: Store a WineD3DBaseTexture instead of a WineD3DTexture.

parent 0629946e
......@@ -2406,7 +2406,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
0, /* usage */
Format,
Pool,
&object->wineD3DTexture,
(IWineD3DTexture **) &object->wineD3DTexture,
0, /* SharedHandle */
(IUnknown *) ICOM_INTERFACE(object, IDirectDrawSurface7),
D3D7CB_CreateSurface );
......
......@@ -227,7 +227,7 @@ struct IDirectDrawSurfaceImpl
/* Connections to other Objects */
IDirectDrawImpl *ddraw;
IWineD3DSurface *WineD3DSurface;
IWineD3DTexture *wineD3DTexture;
IWineD3DBaseTexture *wineD3DTexture;
/* This implementation handles attaching surfaces to other surfaces */
IDirectDrawSurfaceImpl *next_attached;
......
......@@ -2295,7 +2295,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
IDirectDrawSurfaceImpl *surf = (IDirectDrawSurfaceImpl *) This->Handles[Value - 1].ptr;
return IWineD3DDevice_SetTexture(This->wineD3DDevice,
0,
(IWineD3DBaseTexture *) surf->wineD3DTexture);
surf->wineD3DTexture);
}
}
......@@ -3946,7 +3946,7 @@ IDirect3DDeviceImpl_7_SetTexture(IDirect3DDevice7 *iface,
/* Texture may be NULL here */
return IWineD3DDevice_SetTexture(This->wineD3DDevice,
Stage,
surf ? (IWineD3DBaseTexture * ) surf->wineD3DTexture : NULL);
surf ? surf->wineD3DTexture : NULL);
}
static HRESULT WINAPI
......
......@@ -301,7 +301,7 @@ IDirectDrawSurfaceImpl_Release(IDirectDrawSurface7 *iface)
*/
if(This->wineD3DTexture)
{
IWineD3DTexture_Release(This->wineD3DTexture);
IWineD3DBaseTexture_Release(This->wineD3DTexture);
}
/* If it's the RenderTarget, destroy the d3ddevice */
else if( (ddraw->d3d_initialized) && (This == ddraw->d3d_target))
......@@ -1815,8 +1815,8 @@ IDirectDrawSurfaceImpl_SetLOD(IDirectDrawSurface7 *iface,
return DDERR_INVALIDOBJECT;
}
return IWineD3DTexture_SetLOD(This->wineD3DTexture,
MaxLOD);
return IWineD3DBaseTexture_SetLOD(This->wineD3DTexture,
MaxLOD);
}
/*****************************************************************************
......@@ -1846,7 +1846,7 @@ IDirectDrawSurfaceImpl_GetLOD(IDirectDrawSurface7 *iface,
if (!(This->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_TEXTUREMANAGE))
return DDERR_INVALIDOBJECT;
*MaxLOD = IWineD3DTexture_GetLOD(This->wineD3DTexture);
*MaxLOD = IWineD3DBaseTexture_GetLOD(This->wineD3DTexture);
return DD_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment