d3d10: Implement ID3D10Effect::GetDevice().

This commit is contained in:
Henri Verbeet 2009-03-06 08:43:48 +01:00 committed by Alexandre Julliard
parent 9da1d844b8
commit 449be2d316
3 changed files with 11 additions and 2 deletions

View file

@ -224,6 +224,8 @@ HRESULT WINAPI D3D10CreateEffectFromMemory(void *data, SIZE_T data_size, UINT fl
object->vtbl = &d3d10_effect_vtbl;
object->refcount = 1;
ID3D10Device_AddRef(device);
object->device = device;
hr = d3d10_effect_parse(object, data, data_size);
if (FAILED(hr))

View file

@ -80,6 +80,7 @@ struct d3d10_effect
const struct ID3D10EffectVtbl *vtbl;
LONG refcount;
ID3D10Device *device;
DWORD technique_count;
DWORD index_offset;
DWORD blendstate_count;

View file

@ -589,6 +589,7 @@ static ULONG STDMETHODCALLTYPE d3d10_effect_Release(ID3D10Effect *iface)
}
HeapFree(GetProcessHeap(), 0, This->techniques);
}
ID3D10Device_Release(This->device);
HeapFree(GetProcessHeap(), 0, This);
}
@ -613,9 +614,14 @@ static BOOL STDMETHODCALLTYPE d3d10_effect_IsPool(ID3D10Effect *iface)
static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDevice(ID3D10Effect *iface, ID3D10Device **device)
{
FIXME("iface %p, device %p stub!\n", iface, device);
struct d3d10_effect *This = (struct d3d10_effect *)iface;
return E_NOTIMPL;
TRACE("iface %p, device %p\n", iface, device);
ID3D10Device_AddRef(This->device);
*device = This->device;
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDesc(ID3D10Effect *iface, D3D10_EFFECT_DESC *desc)