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

wined3d: Get rid of IWineD3DVolumeTextureImpl.

parent ed003785
...@@ -1140,7 +1140,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa ...@@ -1140,7 +1140,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
void *parent, const struct wined3d_parent_ops *parent_ops, IWineD3DBaseTexture **ppVolumeTexture) void *parent, const struct wined3d_parent_ops *parent_ops, IWineD3DBaseTexture **ppVolumeTexture)
{ {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DVolumeTextureImpl *object; IWineD3DBaseTextureImpl *object;
HRESULT hr; HRESULT hr;
TRACE("(%p) : W(%u) H(%u) D(%u), Lvl(%u) Usage(%#x), Fmt(%u,%s), Pool(%s)\n", This, Width, Height, TRACE("(%p) : W(%u) H(%u) D(%u), Lvl(%u) Usage(%#x), Fmt(%u,%s), Pool(%s)\n", This, Width, Height,
......
...@@ -85,7 +85,7 @@ void volume_add_dirty_box(struct IWineD3DVolumeImpl *volume, const WINED3DBOX *d ...@@ -85,7 +85,7 @@ void volume_add_dirty_box(struct IWineD3DVolumeImpl *volume, const WINED3DBOX *d
} }
} }
void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *container) void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DBaseTextureImpl *container)
{ {
TRACE("volume %p, container %p.\n", volume, container); TRACE("volume %p, container %p.\n", volume, container);
......
/* /*
* IWineD3DVolumeTexture implementation
*
* Copyright 2002-2005 Jason Edmeades * Copyright 2002-2005 Jason Edmeades
* Copyright 2002-2005 Raphael Junqueira * Copyright 2002-2005 Raphael Junqueira
* Copyright 2005 Oliver Stieber * Copyright 2005 Oliver Stieber
...@@ -113,7 +111,7 @@ static const struct wined3d_resource_ops volumetexture_resource_ops = ...@@ -113,7 +111,7 @@ static const struct wined3d_resource_ops volumetexture_resource_ops =
volumetexture_unload, volumetexture_unload,
}; };
static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This) static void volumetexture_cleanup(IWineD3DBaseTextureImpl *This)
{ {
unsigned int i; unsigned int i;
...@@ -141,7 +139,7 @@ static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This) ...@@ -141,7 +139,7 @@ static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This)
static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DBaseTexture *iface, REFIID riid, LPVOID *ppobj) static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DBaseTexture *iface, REFIID riid, LPVOID *ppobj)
{ {
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase) || IsEqualGUID(riid, &IID_IWineD3DBase)
...@@ -158,7 +156,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DBaseTextu ...@@ -158,7 +156,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DBaseTextu
static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DBaseTexture *iface) static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DBaseTexture *iface)
{ {
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref); TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref);
return InterlockedIncrement(&This->resource.ref); return InterlockedIncrement(&This->resource.ref);
} }
...@@ -166,7 +164,7 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DBaseTexture *iface) ...@@ -166,7 +164,7 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DBaseTexture *iface)
/* Do not call while under the GL lock. */ /* Do not call while under the GL lock. */
static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DBaseTexture *iface) static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DBaseTexture *iface)
{ {
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
ULONG ref; ULONG ref;
TRACE("(%p) : Releasing from %d\n", This, This->resource.ref); TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
ref = InterlockedDecrement(&This->resource.ref); ref = InterlockedDecrement(&This->resource.ref);
...@@ -182,28 +180,28 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DBaseTexture *iface ...@@ -182,28 +180,28 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DBaseTexture *iface
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DBaseTexture *iface, static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DBaseTexture *iface,
REFGUID riid, const void *data, DWORD data_size, DWORD flags) REFGUID riid, const void *data, DWORD data_size, DWORD flags)
{ {
return resource_set_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, riid, data, data_size, flags); return resource_set_private_data(&((IWineD3DBaseTextureImpl *)iface)->resource, riid, data, data_size, flags);
} }
static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetPrivateData(IWineD3DBaseTexture *iface, static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetPrivateData(IWineD3DBaseTexture *iface,
REFGUID guid, void *data, DWORD *data_size) REFGUID guid, void *data, DWORD *data_size)
{ {
return resource_get_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, guid, data, data_size); return resource_get_private_data(&((IWineD3DBaseTextureImpl *)iface)->resource, guid, data, data_size);
} }
static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DBaseTexture *iface, REFGUID refguid) static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DBaseTexture *iface, REFGUID refguid)
{ {
return resource_free_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, refguid); return resource_free_private_data(&((IWineD3DBaseTextureImpl *)iface)->resource, refguid);
} }
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DBaseTexture *iface, DWORD priority) static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DBaseTexture *iface, DWORD priority)
{ {
return resource_set_priority(&((IWineD3DVolumeTextureImpl *)iface)->resource, priority); return resource_set_priority(&((IWineD3DBaseTextureImpl *)iface)->resource, priority);
} }
static DWORD WINAPI IWineD3DVolumeTextureImpl_GetPriority(IWineD3DBaseTexture *iface) static DWORD WINAPI IWineD3DVolumeTextureImpl_GetPriority(IWineD3DBaseTexture *iface)
{ {
return resource_get_priority(&((IWineD3DVolumeTextureImpl *)iface)->resource); return resource_get_priority(&((IWineD3DBaseTextureImpl *)iface)->resource);
} }
static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DBaseTexture *iface) static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DBaseTexture *iface)
...@@ -213,14 +211,14 @@ static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DBaseTexture *iface) ...@@ -213,14 +211,14 @@ static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DBaseTexture *iface)
static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DBaseTexture *iface) static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DBaseTexture *iface)
{ {
return resource_get_type(&((IWineD3DVolumeTextureImpl *)iface)->resource); return resource_get_type(&((IWineD3DBaseTextureImpl *)iface)->resource);
} }
static void * WINAPI IWineD3DVolumeTextureImpl_GetParent(IWineD3DBaseTexture *iface) static void * WINAPI IWineD3DVolumeTextureImpl_GetParent(IWineD3DBaseTexture *iface)
{ {
TRACE("iface %p\n", iface); TRACE("iface %p\n", iface);
return ((IWineD3DVolumeTextureImpl *)iface)->resource.parent; return ((IWineD3DBaseTextureImpl *)iface)->resource.parent;
} }
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew) static DWORD WINAPI IWineD3DVolumeTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew)
...@@ -318,7 +316,7 @@ static const IWineD3DBaseTextureVtbl IWineD3DVolumeTexture_Vtbl = ...@@ -318,7 +316,7 @@ static const IWineD3DBaseTextureVtbl IWineD3DVolumeTexture_Vtbl =
IWineD3DVolumeTextureImpl_AddDirtyRegion, IWineD3DVolumeTextureImpl_AddDirtyRegion,
}; };
HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height, HRESULT volumetexture_init(IWineD3DBaseTextureImpl *texture, UINT width, UINT height,
UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id,
WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops)
{ {
......
...@@ -1965,6 +1965,10 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT ...@@ -1965,6 +1965,10 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool,
void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
HRESULT volumetexture_init(IWineD3DBaseTextureImpl *texture, UINT width, UINT height,
UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id,
WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
/***************************************************************************** /*****************************************************************************
* IWineD3DCubeTexture implementation structure (extends IWineD3DBaseTextureImpl) * IWineD3DCubeTexture implementation structure (extends IWineD3DBaseTextureImpl)
*/ */
...@@ -1986,7 +1990,7 @@ typedef struct IWineD3DVolumeImpl ...@@ -1986,7 +1990,7 @@ typedef struct IWineD3DVolumeImpl
const IWineD3DVolumeVtbl *lpVtbl; const IWineD3DVolumeVtbl *lpVtbl;
struct wined3d_resource resource; struct wined3d_resource resource;
struct IWineD3DVolumeTextureImpl *container; struct IWineD3DBaseTextureImpl *container;
BOOL lockable; BOOL lockable;
BOOL locked; BOOL locked;
WINED3DBOX lockedBox; WINED3DBOX lockedBox;
...@@ -2004,19 +2008,7 @@ HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT ...@@ -2004,19 +2008,7 @@ HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT
UINT height, UINT depth, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, UINT height, UINT depth, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool,
void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
void volume_load(IWineD3DVolumeImpl *volume, UINT level, BOOL srgb_mode) DECLSPEC_HIDDEN; void volume_load(IWineD3DVolumeImpl *volume, UINT level, BOOL srgb_mode) DECLSPEC_HIDDEN;
void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *container) DECLSPEC_HIDDEN; void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DBaseTextureImpl *container) DECLSPEC_HIDDEN;
typedef struct IWineD3DVolumeTextureImpl
{
/* IUnknown & WineD3DResource/WineD3DBaseTexture Information */
const IWineD3DBaseTextureVtbl *lpVtbl;
struct wined3d_resource resource;
IWineD3DBaseTextureClass baseTexture;
} IWineD3DVolumeTextureImpl;
HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height,
UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id,
WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
/***************************************************************************** /*****************************************************************************
* Structure for DIB Surfaces (GetDC and GDI surfaces) * Structure for DIB Surfaces (GetDC and GDI surfaces)
......
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