Commit bc2cf94d authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

Reimplemented SwapTextureHandles.

parent ae10e9c5
......@@ -901,12 +901,20 @@ Main_IDirect3DDeviceImpl_3_2T_SetLightState(LPDIRECT3DDEVICE3 iface,
}
HRESULT WINAPI
Main_IDirect3DDeviceImpl_2_SwapTextureHandles(LPDIRECT3DDEVICE2 iface,
LPDIRECT3DTEXTURE2 lpD3DTex1,
LPDIRECT3DTEXTURE2 lpD3DTex2)
Main_IDirect3DDeviceImpl_2_1T_SwapTextureHandles(LPDIRECT3DDEVICE2 iface,
LPDIRECT3DTEXTURE2 lpD3DTex1,
LPDIRECT3DTEXTURE2 lpD3DTex2)
{
ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface);
FIXME("(%p/%p)->(%p,%p): stub!\n", This, iface, lpD3DTex1, lpD3DTex2);
IDirectDrawSurfaceImpl tmp,*surf1,*surf2;
TRACE("(%p/%p)->(%p,%p):\n", This, iface, lpD3DTex1, lpD3DTex2);
surf1 = ICOM_OBJECT(IDirectDrawSurfaceImpl,IDirect3DTexture2,lpD3DTex1);
surf2 = ICOM_OBJECT(IDirectDrawSurfaceImpl,IDirect3DTexture2,lpD3DTex2);
tmp = *surf1;
*surf1 = *surf2;
*surf2 = tmp;
return DD_OK;
}
......@@ -995,16 +1003,6 @@ Main_IDirect3DDeviceImpl_1_Initialize(LPDIRECT3DDEVICE iface,
}
HRESULT WINAPI
Main_IDirect3DDeviceImpl_1_SwapTextureHandles(LPDIRECT3DDEVICE iface,
LPDIRECT3DTEXTURE lpD3Dtex1,
LPDIRECT3DTEXTURE lpD3DTex2)
{
ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice, iface);
FIXME("(%p/%p)->(%p,%p): stub!\n", This, iface, lpD3Dtex1, lpD3DTex2);
return DD_OK;
}
HRESULT WINAPI
Main_IDirect3DDeviceImpl_1_CreateExecuteBuffer(LPDIRECT3DDEVICE iface,
LPD3DEXECUTEBUFFERDESC lpDesc,
LPDIRECT3DEXECUTEBUFFER* lplpDirect3DExecuteBuffer,
......@@ -1670,6 +1668,17 @@ Thunk_IDirect3DDeviceImpl_1_GetCaps(LPDIRECT3DDEVICE iface,
}
HRESULT WINAPI
Thunk_IDirect3DDeviceImpl_1_SwapTextureHandles(LPDIRECT3DDEVICE iface,
LPDIRECT3DTEXTURE lpD3DTex1,
LPDIRECT3DTEXTURE lpD3DTex2)
{
TRACE("(%p)->(%p,%p) thunking to IDirect3DDevice2 interface.\n", iface, lpD3DTex1, lpD3DTex2);
return IDirect3DDevice2_SwapTextureHandles(COM_INTERFACE_CAST(IDirect3DDeviceImpl, IDirect3DDevice, IDirect3DDevice2, iface),
COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, IDirect3DTexture, IDirect3DTexture2, lpD3DTex1),
COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, IDirect3DTexture, IDirect3DTexture2, lpD3DTex2));
}
HRESULT WINAPI
Thunk_IDirect3DDeviceImpl_2_GetStats(LPDIRECT3DDEVICE2 iface,
LPD3DSTATS lpD3DStats)
{
......
......@@ -345,9 +345,9 @@ Main_IDirect3DDeviceImpl_3_2T_SetLightState(LPDIRECT3DDEVICE3 iface,
DWORD dwLightState);
HRESULT WINAPI
Main_IDirect3DDeviceImpl_2_SwapTextureHandles(LPDIRECT3DDEVICE2 iface,
LPDIRECT3DTEXTURE2 lpD3DTex1,
LPDIRECT3DTEXTURE2 lpD3DTex2);
Main_IDirect3DDeviceImpl_2_1T_SwapTextureHandles(LPDIRECT3DDEVICE2 iface,
LPDIRECT3DTEXTURE2 lpD3DTex1,
LPDIRECT3DTEXTURE2 lpD3DTex2);
HRESULT WINAPI
Main_IDirect3DDeviceImpl_2_1T_EnumTextureFormats(LPDIRECT3DDEVICE2 iface,
......@@ -393,11 +393,6 @@ Main_IDirect3DDeviceImpl_1_Initialize(LPDIRECT3DDEVICE iface,
LPD3DDEVICEDESC lpD3DDVDesc);
HRESULT WINAPI
Main_IDirect3DDeviceImpl_1_SwapTextureHandles(LPDIRECT3DDEVICE iface,
LPDIRECT3DTEXTURE lpD3Dtex1,
LPDIRECT3DTEXTURE lpD3DTex2);
HRESULT WINAPI
Main_IDirect3DDeviceImpl_1_CreateExecuteBuffer(LPDIRECT3DDEVICE iface,
LPD3DEXECUTEBUFFERDESC lpDesc,
LPDIRECT3DEXECUTEBUFFER* lplpDirect3DExecuteBuffer,
......@@ -680,6 +675,11 @@ Thunk_IDirect3DDeviceImpl_1_GetCaps(LPDIRECT3DDEVICE iface,
LPD3DDEVICEDESC lpD3DHELDevDesc);
HRESULT WINAPI
Thunk_IDirect3DDeviceImpl_1_SwapTextureHandles(LPDIRECT3DDEVICE iface,
LPDIRECT3DTEXTURE lpD3Dtex1,
LPDIRECT3DTEXTURE lpD3DTex2);
HRESULT WINAPI
Thunk_IDirect3DDeviceImpl_2_GetStats(LPDIRECT3DDEVICE2 iface,
LPD3DSTATS lpD3DStats);
......
......@@ -1697,7 +1697,7 @@ ICOM_VTABLE(IDirect3DDevice2) VTABLE_IDirect3DDevice2 =
XCAST(AddRef) Thunk_IDirect3DDeviceImpl_2_AddRef,
XCAST(Release) Thunk_IDirect3DDeviceImpl_2_Release,
XCAST(GetCaps) Thunk_IDirect3DDeviceImpl_2_GetCaps,
XCAST(SwapTextureHandles) Main_IDirect3DDeviceImpl_2_SwapTextureHandles,
XCAST(SwapTextureHandles) Main_IDirect3DDeviceImpl_2_1T_SwapTextureHandles,
XCAST(GetStats) Thunk_IDirect3DDeviceImpl_2_GetStats,
XCAST(AddViewport) Thunk_IDirect3DDeviceImpl_2_AddViewport,
XCAST(DeleteViewport) Thunk_IDirect3DDeviceImpl_2_DeleteViewport,
......@@ -1747,7 +1747,7 @@ ICOM_VTABLE(IDirect3DDevice) VTABLE_IDirect3DDevice =
XCAST(Release) Thunk_IDirect3DDeviceImpl_1_Release,
XCAST(Initialize) Main_IDirect3DDeviceImpl_1_Initialize,
XCAST(GetCaps) Thunk_IDirect3DDeviceImpl_1_GetCaps,
XCAST(SwapTextureHandles) Main_IDirect3DDeviceImpl_1_SwapTextureHandles,
XCAST(SwapTextureHandles) Thunk_IDirect3DDeviceImpl_1_SwapTextureHandles,
XCAST(CreateExecuteBuffer) GL_IDirect3DDeviceImpl_1_CreateExecuteBuffer,
XCAST(GetStats) Thunk_IDirect3DDeviceImpl_1_GetStats,
XCAST(Execute) Main_IDirect3DDeviceImpl_1_Execute,
......
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