Commit 19d85623 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

ddraw: Implement D3DOP_TEXTURELOAD.

parent 8bb7b949
......@@ -352,8 +352,30 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
break;
case D3DOP_TEXTURELOAD:
WARN("TEXTURELOAD-s (%u)\n", count);
instr += count * size;
TRACE("TEXTURELOAD (%u)\n", count);
for (i = 0; i < count; ++i)
{
D3DTEXTURELOAD *ci = (D3DTEXTURELOAD *)instr;
struct ddraw_surface *dst, *src;
instr += size;
if (!(dst = ddraw_get_object(&device->handle_table,
ci->hDestTexture - 1, DDRAW_HANDLE_SURFACE)))
{
WARN("Invalid destination texture handle %#x.\n", ci->hDestTexture);
continue;
}
if (!(src = ddraw_get_object(&device->handle_table,
ci->hSrcTexture - 1, DDRAW_HANDLE_SURFACE)))
{
WARN("Invalid source texture handle %#x.\n", ci->hSrcTexture);
continue;
}
IDirect3DTexture2_Load(&dst->IDirect3DTexture2_iface, &src->IDirect3DTexture2_iface);
}
break;
case D3DOP_EXIT:
......
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