Commit b8d07a2b authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d8: Get rid of IDirect3DCubeTexture8Impl.

parent 7bb17f49
...@@ -104,7 +104,6 @@ typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl; ...@@ -104,7 +104,6 @@ typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl;
typedef struct IDirect3DVolumeTexture8Impl IDirect3DVolumeTexture8Impl; typedef struct IDirect3DVolumeTexture8Impl IDirect3DVolumeTexture8Impl;
typedef struct IDirect3D8Impl IDirect3D8Impl; typedef struct IDirect3D8Impl IDirect3D8Impl;
typedef struct IDirect3DDevice8Impl IDirect3DDevice8Impl; typedef struct IDirect3DDevice8Impl IDirect3DDevice8Impl;
typedef struct IDirect3DCubeTexture8Impl IDirect3DCubeTexture8Impl;
typedef struct IDirect3DIndexBuffer8Impl IDirect3DIndexBuffer8Impl; typedef struct IDirect3DIndexBuffer8Impl IDirect3DIndexBuffer8Impl;
typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl; typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl;
typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl; typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl;
...@@ -312,28 +311,13 @@ struct IDirect3DBaseTexture8Impl ...@@ -312,28 +311,13 @@ struct IDirect3DBaseTexture8Impl
struct d3d8_texture struct d3d8_texture
{ {
IDirect3DTexture8 IDirect3DTexture8_iface; IDirect3DBaseTexture8 IDirect3DBaseTexture8_iface;
LONG refcount; LONG refcount;
struct wined3d_texture *wined3d_texture; struct wined3d_texture *wined3d_texture;
IDirect3DDevice8 *parent_device; IDirect3DDevice8 *parent_device;
}; };
/* --------------------- */ HRESULT cubetexture_init(struct d3d8_texture *texture, IDirect3DDevice8Impl *device,
/* IDirect3DCubeTexture8 */
/* --------------------- */
/*****************************************************************************
* IDirect3DCubeTexture8 implementation structure
*/
struct IDirect3DCubeTexture8Impl
{
IDirect3DCubeTexture8 IDirect3DCubeTexture8_iface;
LONG ref;
struct wined3d_texture *wined3d_texture;
IDirect3DDevice8 *parentDevice;
};
HRESULT cubetexture_init(IDirect3DCubeTexture8Impl *texture, IDirect3DDevice8Impl *device,
UINT edge_length, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN; UINT edge_length, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
HRESULT texture_init(struct d3d8_texture *texture, IDirect3DDevice8Impl *device, HRESULT texture_init(struct d3d8_texture *texture, IDirect3DDevice8Impl *device,
......
...@@ -707,7 +707,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateTexture(IDirect3DDevice8 *iface ...@@ -707,7 +707,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateTexture(IDirect3DDevice8 *iface
} }
TRACE("Created texture %p.\n", object); TRACE("Created texture %p.\n", object);
*texture = &object->IDirect3DTexture8_iface; *texture = (IDirect3DTexture8 *)&object->IDirect3DBaseTexture8_iface;
return D3D_OK; return D3D_OK;
} }
...@@ -748,7 +748,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateCubeTexture(IDirect3DDevice8 *i ...@@ -748,7 +748,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateCubeTexture(IDirect3DDevice8 *i
UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DCubeTexture8 **texture) UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DCubeTexture8 **texture)
{ {
IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface);
IDirect3DCubeTexture8Impl *object; struct d3d8_texture *object;
HRESULT hr; HRESULT hr;
TRACE("iface %p, edge_length %u, levels %u, usage %#x, format %#x, pool %#x, texture %p.\n", TRACE("iface %p, edge_length %u, levels %u, usage %#x, format %#x, pool %#x, texture %p.\n",
...@@ -770,7 +770,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateCubeTexture(IDirect3DDevice8 *i ...@@ -770,7 +770,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateCubeTexture(IDirect3DDevice8 *i
} }
TRACE("Created cube texture %p.\n", object); TRACE("Created cube texture %p.\n", object);
*texture = &object->IDirect3DCubeTexture8_iface; *texture = (IDirect3DCubeTexture8 *)&object->IDirect3DBaseTexture8_iface;
return hr; return hr;
} }
......
...@@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8); ...@@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
static inline struct d3d8_texture *impl_from_IDirect3DTexture8(IDirect3DTexture8 *iface) static inline struct d3d8_texture *impl_from_IDirect3DTexture8(IDirect3DTexture8 *iface)
{ {
return CONTAINING_RECORD(iface, struct d3d8_texture, IDirect3DTexture8_iface); return CONTAINING_RECORD(iface, struct d3d8_texture, IDirect3DBaseTexture8_iface);
} }
static HRESULT WINAPI d3d8_texture_2d_QueryInterface(IDirect3DTexture8 *iface, REFIID riid, void **out) static HRESULT WINAPI d3d8_texture_2d_QueryInterface(IDirect3DTexture8 *iface, REFIID riid, void **out)
...@@ -402,7 +402,7 @@ HRESULT texture_init(struct d3d8_texture *texture, IDirect3DDevice8Impl *device, ...@@ -402,7 +402,7 @@ HRESULT texture_init(struct d3d8_texture *texture, IDirect3DDevice8Impl *device,
{ {
HRESULT hr; HRESULT hr;
texture->IDirect3DTexture8_iface.lpVtbl = &Direct3DTexture8_Vtbl; texture->IDirect3DBaseTexture8_iface.lpVtbl = (const IDirect3DBaseTexture8Vtbl *)&Direct3DTexture8_Vtbl;
texture->refcount = 1; texture->refcount = 1;
wined3d_mutex_lock(); 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