Commit 21c65893 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Get rid of IDirect3DCubeTexture9Impl.

parent 5569db9a
......@@ -305,28 +305,13 @@ typedef struct IDirect3DBaseTexture9Impl
struct d3d9_texture
{
IDirect3DTexture9 IDirect3DTexture9_iface;
IDirect3DBaseTexture9 IDirect3DBaseTexture9_iface;
LONG refcount;
struct wined3d_texture *wined3d_texture;
IDirect3DDevice9Ex *parent_device;
};
/* --------------------- */
/* IDirect3DCubeTexture9 */
/* --------------------- */
/*****************************************************************************
* IDirect3DCubeTexture9 implementation structure
*/
typedef struct IDirect3DCubeTexture9Impl
{
IDirect3DCubeTexture9 IDirect3DCubeTexture9_iface;
LONG ref;
struct wined3d_texture *wined3d_texture;
IDirect3DDevice9Ex *parentDevice;
} IDirect3DCubeTexture9Impl;
HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Impl *device,
HRESULT cubetexture_init(struct d3d9_texture *texture, IDirect3DDevice9Impl *device,
UINT edge_length, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
HRESULT texture_init(struct d3d9_texture *texture, IDirect3DDevice9Impl *device,
UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
......
......@@ -721,7 +721,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(IDirect3DDevice9Ex *ifa
}
TRACE("Created texture %p.\n", object);
*texture = &object->IDirect3DTexture9_iface;
*texture = (IDirect3DTexture9 *)&object->IDirect3DBaseTexture9_iface;
return D3D_OK;
}
......@@ -768,7 +768,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(IDirect3DDevice9Ex
IDirect3DCubeTexture9 **texture, HANDLE *shared_handle)
{
IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface);
IDirect3DCubeTexture9Impl *object;
struct d3d9_texture *object;
HRESULT hr;
TRACE("iface %p, edge_length %u, levels %u, usage %#x, format %#x, pool %#x, texture %p, shared_handle %p.\n",
......@@ -793,7 +793,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(IDirect3DDevice9Ex
}
TRACE("Created cube texture %p.\n", object);
*texture = &object->IDirect3DCubeTexture9_iface;
*texture = (IDirect3DCubeTexture9 *)&object->IDirect3DBaseTexture9_iface;
return D3D_OK;
}
......
......@@ -27,7 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
static inline struct d3d9_texture *impl_from_IDirect3DTexture9(IDirect3DTexture9 *iface)
{
return CONTAINING_RECORD(iface, struct d3d9_texture, IDirect3DTexture9_iface);
return CONTAINING_RECORD(iface, struct d3d9_texture, IDirect3DBaseTexture9_iface);
}
static HRESULT WINAPI d3d9_texture_2d_QueryInterface(IDirect3DTexture9 *iface, REFIID riid, void **out)
......@@ -447,7 +447,7 @@ HRESULT texture_init(struct d3d9_texture *texture, IDirect3DDevice9Impl *device,
{
HRESULT hr;
texture->IDirect3DTexture9_iface.lpVtbl = &d3d9_texture_2d_vtbl;
texture->IDirect3DBaseTexture9_iface.lpVtbl = (const IDirect3DBaseTexture9Vtbl *)&d3d9_texture_2d_vtbl;
texture->refcount = 1;
wined3d_mutex_lock();
......
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