mirror of
https://github.com/reactos/wine.git
synced 2025-02-18 03:48:01 +00:00
wined3d: Get rid of IWineD3DVolumeTextureImpl.
This commit is contained in:
parent
ed0037854a
commit
f77c0e36a4
@ -1139,8 +1139,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
|
||||
UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, enum wined3d_format_id Format, WINED3DPOOL Pool,
|
||||
void *parent, const struct wined3d_parent_ops *parent_ops, IWineD3DBaseTexture **ppVolumeTexture)
|
||||
{
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
IWineD3DVolumeTextureImpl *object;
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
IWineD3DBaseTextureImpl *object;
|
||||
HRESULT hr;
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
/*
|
||||
* IWineD3DVolumeTexture implementation
|
||||
*
|
||||
* Copyright 2002-2005 Jason Edmeades
|
||||
* Copyright 2002-2005 Raphael Junqueira
|
||||
* Copyright 2005 Oliver Stieber
|
||||
@ -113,7 +111,7 @@ static const struct wined3d_resource_ops volumetexture_resource_ops =
|
||||
volumetexture_unload,
|
||||
};
|
||||
|
||||
static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This)
|
||||
static void volumetexture_cleanup(IWineD3DBaseTextureImpl *This)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
@ -141,7 +139,7 @@ static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This)
|
||||
|
||||
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);
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|
||||
@ -158,7 +156,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DBaseTextu
|
||||
|
||||
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);
|
||||
return InterlockedIncrement(&This->resource.ref);
|
||||
}
|
||||
@ -166,7 +164,7 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DBaseTexture *iface)
|
||||
/* Do not call while under the GL lock. */
|
||||
static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DBaseTexture *iface)
|
||||
{
|
||||
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
|
||||
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
|
||||
ULONG ref;
|
||||
TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
|
||||
ref = InterlockedDecrement(&This->resource.ref);
|
||||
@ -182,28 +180,28 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DBaseTexture *iface
|
||||
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DBaseTexture *iface,
|
||||
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,
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
return resource_set_priority(&((IWineD3DVolumeTextureImpl *)iface)->resource, priority);
|
||||
return resource_set_priority(&((IWineD3DBaseTextureImpl *)iface)->resource, priority);
|
||||
}
|
||||
|
||||
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)
|
||||
@ -213,14 +211,14 @@ static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(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)
|
||||
{
|
||||
TRACE("iface %p\n", iface);
|
||||
|
||||
return ((IWineD3DVolumeTextureImpl *)iface)->resource.parent;
|
||||
return ((IWineD3DBaseTextureImpl *)iface)->resource.parent;
|
||||
}
|
||||
|
||||
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew)
|
||||
@ -318,7 +316,7 @@ static const IWineD3DBaseTextureVtbl IWineD3DVolumeTexture_Vtbl =
|
||||
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,
|
||||
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
|
||||
IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool,
|
||||
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)
|
||||
*/
|
||||
@ -1986,7 +1990,7 @@ typedef struct IWineD3DVolumeImpl
|
||||
const IWineD3DVolumeVtbl *lpVtbl;
|
||||
struct wined3d_resource resource;
|
||||
|
||||
struct IWineD3DVolumeTextureImpl *container;
|
||||
struct IWineD3DBaseTextureImpl *container;
|
||||
BOOL lockable;
|
||||
BOOL locked;
|
||||
WINED3DBOX lockedBox;
|
||||
@ -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,
|
||||
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_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *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;
|
||||
void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DBaseTextureImpl *container) DECLSPEC_HIDDEN;
|
||||
|
||||
/*****************************************************************************
|
||||
* Structure for DIB Surfaces (GetDC and GDI surfaces)
|
||||
|
Loading…
x
Reference in New Issue
Block a user