Change AddRef in queryInterface to IUnknown_AddRef.
Move ppVoulme to d3d9voloumeimpl structure. Some minor stylistic changes (making everything the same).
This commit is contained in:
parent
898068f3ce
commit
8435f6f058
|
@ -22,16 +22,16 @@
|
|||
#include "config.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
/* IDirect3DBaseTexture9 IUnknown parts follow: */
|
||||
HRESULT WINAPI IDirect3DBaseTexture9Impl_QueryInterface(LPDIRECT3DBASETEXTURE9 iface, REFIID riid, LPVOID* ppobj) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DResource9)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DBaseTexture9)) {
|
||||
IDirect3DBaseTexture9Impl_AddRef(iface);
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
@ -65,73 +65,87 @@ ULONG WINAPI IDirect3DBaseTexture9Impl_Release(LPDIRECT3DBASETEXTURE9 iface) {
|
|||
/* IDirect3DBaseTexture9 IDirect3DResource9 Interface follow: */
|
||||
HRESULT WINAPI IDirect3DBaseTexture9Impl_GetDevice(LPDIRECT3DBASETEXTURE9 iface, IDirect3DDevice9** ppDevice) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DBaseTexture9Impl_SetPrivateData(LPDIRECT3DBASETEXTURE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_SetPrivateData(This->wineD3DBaseTexture, refguid, pData, SizeOfData, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DBaseTexture9Impl_GetPrivateData(LPDIRECT3DBASETEXTURE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_GetPrivateData(This->wineD3DBaseTexture, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DBaseTexture9Impl_FreePrivateData(LPDIRECT3DBASETEXTURE9 iface, REFGUID refguid) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_FreePrivateData(This->wineD3DBaseTexture, refguid);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DBaseTexture9Impl_SetPriority(LPDIRECT3DBASETEXTURE9 iface, DWORD PriorityNew) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_SetPriority(This->wineD3DBaseTexture, PriorityNew);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DBaseTexture9Impl_GetPriority(LPDIRECT3DBASETEXTURE9 iface) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_GetPriority(This->wineD3DBaseTexture);
|
||||
}
|
||||
|
||||
void WINAPI IDirect3DBaseTexture9Impl_PreLoad(LPDIRECT3DBASETEXTURE9 iface) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
IWineD3DBaseTexture_PreLoad(This->wineD3DBaseTexture);
|
||||
return ;
|
||||
}
|
||||
|
||||
D3DRESOURCETYPE WINAPI IDirect3DBaseTexture9Impl_GetType(LPDIRECT3DBASETEXTURE9 iface) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_GetType(This->wineD3DBaseTexture);
|
||||
}
|
||||
|
||||
/* IDirect3DBaseTexture9 Interface follow: */
|
||||
DWORD WINAPI IDirect3DBaseTexture9Impl_SetLOD(LPDIRECT3DBASETEXTURE9 iface, DWORD LODNew) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_SetLOD(This->wineD3DBaseTexture, LODNew);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DBaseTexture9Impl_GetLOD(LPDIRECT3DBASETEXTURE9 iface) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_GetLOD(This->wineD3DBaseTexture);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DBaseTexture9Impl_GetLevelCount(LPDIRECT3DBASETEXTURE9 iface) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_GetLevelCount(This->wineD3DBaseTexture);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DBaseTexture9Impl_SetAutoGenFilterType(LPDIRECT3DBASETEXTURE9 iface, D3DTEXTUREFILTERTYPE FilterType) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_SetAutoGenFilterType(This->wineD3DBaseTexture, FilterType);
|
||||
}
|
||||
|
||||
D3DTEXTUREFILTERTYPE WINAPI IDirect3DBaseTexture9Impl_GetAutoGenFilterType(LPDIRECT3DBASETEXTURE9 iface) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_GetAutoGenFilterType(This->wineD3DBaseTexture);
|
||||
}
|
||||
|
||||
void WINAPI IDirect3DBaseTexture9Impl_GenerateMipSubLevels(LPDIRECT3DBASETEXTURE9 iface) {
|
||||
IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IWineD3DBaseTexture_GenerateMipSubLevels(This->wineD3DBaseTexture);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
* IDirect3DCubeTexture9 implementation
|
||||
*
|
||||
* Copyright 2002-2005 Jason Edmeades
|
||||
* Raphael Junqueira
|
||||
* Copyright 2002-2005 Raphael Junqueira
|
||||
* Copyright 2005 Oliver Stieber
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -22,17 +23,17 @@
|
|||
#include "config.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
|
||||
/* IDirect3DCubeTexture9 IUnknown parts follow: */
|
||||
HRESULT WINAPI IDirect3DCubeTexture9Impl_QueryInterface(LPDIRECT3DCUBETEXTURE9 iface, REFIID riid, LPVOID* ppobj) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DResource9)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DBaseTexture9)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DCubeTexture9)) {
|
||||
IDirect3DCubeTexture9Impl_AddRef(iface);
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
@ -57,6 +58,7 @@ ULONG WINAPI IDirect3DCubeTexture9Impl_Release(LPDIRECT3DCUBETEXTURE9 iface) {
|
|||
TRACE("(%p) : ReleaseRef to %ld\n", This, ref);
|
||||
|
||||
if (ref == 0) {
|
||||
TRACE("Releasing child %p\n", This->wineD3DCubeTexture);
|
||||
IWineD3DCubeTexture_Release(This->wineD3DCubeTexture);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
@ -66,82 +68,97 @@ ULONG WINAPI IDirect3DCubeTexture9Impl_Release(LPDIRECT3DCUBETEXTURE9 iface) {
|
|||
/* IDirect3DCubeTexture9 IDirect3DResource9 Interface follow: */
|
||||
HRESULT WINAPI IDirect3DCubeTexture9Impl_GetDevice(LPDIRECT3DCUBETEXTURE9 iface, IDirect3DDevice9** ppDevice) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
return IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DCubeTexture9Impl_SetPrivateData(LPDIRECT3DCUBETEXTURE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_SetPrivateData(This->wineD3DCubeTexture,refguid,pData,SizeOfData,Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DCubeTexture9Impl_GetPrivateData(LPDIRECT3DCUBETEXTURE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_GetPrivateData(This->wineD3DCubeTexture,refguid,pData,pSizeOfData);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DCubeTexture9Impl_FreePrivateData(LPDIRECT3DCUBETEXTURE9 iface, REFGUID refguid) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_FreePrivateData(This->wineD3DCubeTexture,refguid);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DCubeTexture9Impl_SetPriority(LPDIRECT3DCUBETEXTURE9 iface, DWORD PriorityNew) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_SetPriority(This->wineD3DCubeTexture, PriorityNew);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DCubeTexture9Impl_GetPriority(LPDIRECT3DCUBETEXTURE9 iface) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_GetPriority(This->wineD3DCubeTexture);
|
||||
}
|
||||
|
||||
void WINAPI IDirect3DCubeTexture9Impl_PreLoad(LPDIRECT3DCUBETEXTURE9 iface) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_PreLoad(This->wineD3DCubeTexture);
|
||||
}
|
||||
|
||||
D3DRESOURCETYPE WINAPI IDirect3DCubeTexture9Impl_GetType(LPDIRECT3DCUBETEXTURE9 iface) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_GetType(This->wineD3DCubeTexture);
|
||||
}
|
||||
|
||||
/* IDirect3DCubeTexture9 IDirect3DBaseTexture9 Interface follow: */
|
||||
DWORD WINAPI IDirect3DCubeTexture9Impl_SetLOD(LPDIRECT3DCUBETEXTURE9 iface, DWORD LODNew) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_SetLOD(This->wineD3DCubeTexture, LODNew);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DCubeTexture9Impl_GetLOD(LPDIRECT3DCUBETEXTURE9 iface) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IDirect3DBaseTexture9Impl_GetLOD((LPDIRECT3DBASETEXTURE9) This);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DCubeTexture9Impl_GetLevelCount(LPDIRECT3DCUBETEXTURE9 iface) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_GetLevelCount(This->wineD3DCubeTexture);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DCubeTexture9Impl_SetAutoGenFilterType(LPDIRECT3DCUBETEXTURE9 iface, D3DTEXTUREFILTERTYPE FilterType) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_SetAutoGenFilterType(This->wineD3DCubeTexture, FilterType);
|
||||
}
|
||||
|
||||
D3DTEXTUREFILTERTYPE WINAPI IDirect3DCubeTexture9Impl_GetAutoGenFilterType(LPDIRECT3DCUBETEXTURE9 iface) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_GetAutoGenFilterType(This->wineD3DCubeTexture);
|
||||
}
|
||||
|
||||
void WINAPI IDirect3DCubeTexture9Impl_GenerateMipSubLevels(LPDIRECT3DCUBETEXTURE9 iface) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_GenerateMipSubLevels(This->wineD3DCubeTexture);
|
||||
}
|
||||
|
||||
/* IDirect3DCubeTexture9 Interface follow: */
|
||||
HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE9 iface, UINT Level, D3DSURFACE_DESC* pDesc) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
|
||||
WINED3DSURFACE_DESC wined3ddesc;
|
||||
UINT tmpInt = -1;
|
||||
|
||||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
|
||||
wined3ddesc.Format = &pDesc->Format;
|
||||
wined3ddesc.Type = &pDesc->Type;
|
||||
|
@ -159,8 +176,10 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE9 ifa
|
|||
HRESULT WINAPI IDirect3DCubeTexture9Impl_GetCubeMapSurface(LPDIRECT3DCUBETEXTURE9 iface, D3DCUBEMAP_FACES FaceType, UINT Level, IDirect3DSurface9** ppCubeMapSurface) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
HRESULT hrc = D3D_OK;
|
||||
|
||||
IWineD3DSurface *mySurface = NULL;
|
||||
|
||||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
hrc = IWineD3DCubeTexture_GetCubeMapSurface(This->wineD3DCubeTexture, FaceType, Level, &mySurface);
|
||||
if (hrc == D3D_OK && NULL != ppCubeMapSurface) {
|
||||
IWineD3DCubeTexture_GetParent(mySurface, (IUnknown **)ppCubeMapSurface);
|
||||
|
@ -171,16 +190,19 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl_GetCubeMapSurface(LPDIRECT3DCUBETEXTURE
|
|||
|
||||
HRESULT WINAPI IDirect3DCubeTexture9Impl_LockRect(LPDIRECT3DCUBETEXTURE9 iface, D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_LockRect(This->wineD3DCubeTexture, FaceType, Level, pLockedRect, pRect, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DCubeTexture9Impl_UnlockRect(LPDIRECT3DCUBETEXTURE9 iface, D3DCUBEMAP_FACES FaceType, UINT Level) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_UnlockRect(This->wineD3DCubeTexture, FaceType, Level);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DCubeTexture9Impl_AddDirtyRect(LPDIRECT3DCUBETEXTURE9 iface, D3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) {
|
||||
IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DCubeTexture_AddDirtyRect(This->wineD3DCubeTexture, FaceType, pDirtyRect);
|
||||
}
|
||||
|
||||
|
@ -212,6 +234,8 @@ IDirect3DCubeTexture9Vtbl Direct3DCubeTexture9_Vtbl =
|
|||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* IDirect3DDevice9 IDirect3DCubeTexture9 Methods follow: */
|
||||
HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9 iface,
|
||||
UINT EdgeLength, UINT Levels, DWORD Usage,
|
||||
|
@ -222,18 +246,20 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9 iface,
|
|||
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
|
||||
HRESULT hr = D3D_OK;
|
||||
|
||||
TRACE("(%p) : ELen(%d) Lvl(%d) Usage(%ld) fmt(%u), Pool(%d) Shared(%p)" , This, EdgeLength, Levels, Usage, Format, Pool, pSharedHandle);
|
||||
|
||||
/* Allocate the storage for the device */
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DCubeTexture9Impl));
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
|
||||
if (NULL == object) {
|
||||
FIXME("(%p) allocation of CubeTexture failed\n", This);
|
||||
*ppCubeTexture = NULL;
|
||||
return D3DERR_OUTOFVIDEOMEMORY;
|
||||
}
|
||||
|
||||
object->lpVtbl = &Direct3DCubeTexture9_Vtbl;
|
||||
object->ref = 1;
|
||||
hr = IWineD3DDevice_CreateCubeTexture(This->WineD3DDevice, EdgeLength, Levels, Usage,
|
||||
Format, Pool, &(object->wineD3DCubeTexture), pSharedHandle, (IUnknown *)object,
|
||||
Format, Pool, &object->wineD3DCubeTexture, pSharedHandle, (IUnknown*)object,
|
||||
D3D9CB_CreateSurface);
|
||||
|
||||
if (hr != D3D_OK){
|
||||
|
@ -244,5 +270,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9 iface,
|
|||
} else {
|
||||
*ppCubeTexture = (LPDIRECT3DCUBETEXTURE9) object;
|
||||
}
|
||||
|
||||
TRACE("(%p) returning %p\n",This, *ppCubeTexture);
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "config.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
/* IDirect3DIndexBuffer9 IUnknown parts follow: */
|
||||
HRESULT WINAPI IDirect3DIndexBuffer9Impl_QueryInterface(LPDIRECT3DINDEXBUFFER9 iface, REFIID riid, LPVOID* ppobj) {
|
||||
|
@ -31,7 +31,7 @@ HRESULT WINAPI IDirect3DIndexBuffer9Impl_QueryInterface(LPDIRECT3DINDEXBUFFER9 i
|
|||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DResource9)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DIndexBuffer9)) {
|
||||
IDirect3DIndexBuffer9Impl_AddRef(iface);
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
@ -65,58 +65,68 @@ ULONG WINAPI IDirect3DIndexBuffer9Impl_Release(LPDIRECT3DINDEXBUFFER9 iface) {
|
|||
/* IDirect3DIndexBuffer9 IDirect3DResource9 Interface follow: */
|
||||
HRESULT WINAPI IDirect3DIndexBuffer9Impl_GetDevice(LPDIRECT3DINDEXBUFFER9 iface, IDirect3DDevice9** ppDevice) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DIndexBuffer9Impl_SetPrivateData(LPDIRECT3DINDEXBUFFER9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DIndexBuffer_SetPrivateData(This->wineD3DIndexBuffer, refguid, pData, SizeOfData, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DIndexBuffer9Impl_GetPrivateData(LPDIRECT3DINDEXBUFFER9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DIndexBuffer_GetPrivateData(This->wineD3DIndexBuffer, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DIndexBuffer9Impl_FreePrivateData(LPDIRECT3DINDEXBUFFER9 iface, REFGUID refguid) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DIndexBuffer_FreePrivateData(This->wineD3DIndexBuffer, refguid);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DIndexBuffer9Impl_SetPriority(LPDIRECT3DINDEXBUFFER9 iface, DWORD PriorityNew) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DIndexBuffer_SetPriority(This->wineD3DIndexBuffer, PriorityNew);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DIndexBuffer9Impl_GetPriority(LPDIRECT3DINDEXBUFFER9 iface) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DIndexBuffer_GetPriority(This->wineD3DIndexBuffer);
|
||||
}
|
||||
|
||||
void WINAPI IDirect3DIndexBuffer9Impl_PreLoad(LPDIRECT3DINDEXBUFFER9 iface) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
IWineD3DIndexBuffer_PreLoad(This->wineD3DIndexBuffer);
|
||||
return ;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DIndexBuffer_PreLoad(This->wineD3DIndexBuffer);
|
||||
}
|
||||
|
||||
D3DRESOURCETYPE WINAPI IDirect3DIndexBuffer9Impl_GetType(LPDIRECT3DINDEXBUFFER9 iface) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DIndexBuffer_GetType(This->wineD3DIndexBuffer);
|
||||
}
|
||||
|
||||
/* IDirect3DIndexBuffer9 Interface follow: */
|
||||
HRESULT WINAPI IDirect3DIndexBuffer9Impl_Lock(LPDIRECT3DINDEXBUFFER9 iface, UINT OffsetToLock, UINT SizeToLock, void** ppbData, DWORD Flags) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DIndexBuffer_Lock(This->wineD3DIndexBuffer, OffsetToLock, SizeToLock, (BYTE **)ppbData, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DIndexBuffer9Impl_Unlock(LPDIRECT3DINDEXBUFFER9 iface) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DIndexBuffer_Unlock(This->wineD3DIndexBuffer);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DIndexBuffer9Impl_GetDesc(LPDIRECT3DINDEXBUFFER9 iface, D3DINDEXBUFFER_DESC *pDesc) {
|
||||
IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DIndexBuffer_GetDesc(This->wineD3DIndexBuffer, pDesc);
|
||||
}
|
||||
|
||||
|
@ -149,8 +159,9 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface,
|
|||
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
|
||||
HRESULT hrc = D3D_OK;
|
||||
|
||||
TRACE("(%p) Relay\n", This);
|
||||
/* Allocate the storage for the device */
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DIndexBuffer9Impl));
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
if (NULL == object) {
|
||||
FIXME("Allocation of memory failed\n");
|
||||
*ppIndexBuffer = NULL;
|
||||
|
@ -159,7 +170,8 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface,
|
|||
|
||||
object->lpVtbl = &Direct3DIndexBuffer9_Vtbl;
|
||||
object->ref = 1;
|
||||
hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage, Format, Pool, &(object->wineD3DIndexBuffer), pSharedHandle, (IUnknown *)object);
|
||||
TRACE("Calling wined3d create index buffer\n");
|
||||
hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage, Format, Pool, &object->wineD3DIndexBuffer, pSharedHandle, (IUnknown *)object);
|
||||
if (hrc != D3D_OK) {
|
||||
/* free up object */
|
||||
FIXME("(%p) call to IWineD3DDevice_CreateIndexBuffer failed\n", This);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "config.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
/* IDirect3DResource9 IUnknown parts follow: */
|
||||
HRESULT WINAPI IDirect3DResource9Impl_QueryInterface(LPDIRECT3DRESOURCE9 iface, REFIID riid, LPVOID* ppobj) {
|
||||
|
@ -65,6 +65,9 @@ ULONG WINAPI IDirect3DResource9Impl_Release(LPDIRECT3DRESOURCE9 iface) {
|
|||
HRESULT WINAPI IDirect3DResource9Impl_GetDevice(LPDIRECT3DRESOURCE9 iface, IDirect3DDevice9** ppDevice) {
|
||||
IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
|
||||
IWineD3DDevice *myDevice = NULL;
|
||||
|
||||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
IWineD3DResource_GetDevice(This->wineD3DResource, &myDevice);
|
||||
IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice);
|
||||
IWineD3DDevice_Release(myDevice);
|
||||
|
@ -73,37 +76,44 @@ HRESULT WINAPI IDirect3DResource9Impl_GetDevice(LPDIRECT3DRESOURCE9 iface, IDire
|
|||
|
||||
HRESULT WINAPI IDirect3DResource9Impl_SetPrivateData(LPDIRECT3DRESOURCE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
|
||||
IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DResource_SetPrivateData(This->wineD3DResource, refguid, pData, SizeOfData, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DResource9Impl_GetPrivateData(LPDIRECT3DRESOURCE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
|
||||
IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DResource_GetPrivateData(This->wineD3DResource, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DResource9Impl_FreePrivateData(LPDIRECT3DRESOURCE9 iface, REFGUID refguid) {
|
||||
IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DResource_FreePrivateData(This->wineD3DResource, refguid);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DResource9Impl_SetPriority(LPDIRECT3DRESOURCE9 iface, DWORD PriorityNew) {
|
||||
IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DResource_SetPriority(This->wineD3DResource, PriorityNew);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DResource9Impl_GetPriority(LPDIRECT3DRESOURCE9 iface) {
|
||||
IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DResource_GetPriority(This->wineD3DResource);
|
||||
}
|
||||
|
||||
void WINAPI IDirect3DResource9Impl_PreLoad(LPDIRECT3DRESOURCE9 iface) {
|
||||
IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
IWineD3DResource_PreLoad(This->wineD3DResource);
|
||||
return;
|
||||
}
|
||||
|
||||
D3DRESOURCETYPE WINAPI IDirect3DResource9Impl_GetType(LPDIRECT3DRESOURCE9 iface) {
|
||||
IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DResource_GetType(This->wineD3DResource);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "config.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
/* IDirect3DSurface9 IUnknown parts follow: */
|
||||
HRESULT WINAPI IDirect3DSurface9Impl_QueryInterface(LPDIRECT3DSURFACE9 iface, REFIID riid, LPVOID* ppobj) {
|
||||
|
@ -31,7 +31,7 @@ HRESULT WINAPI IDirect3DSurface9Impl_QueryInterface(LPDIRECT3DSURFACE9 iface, RE
|
|||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DResource9)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DSurface9)) {
|
||||
IDirect3DSurface9Impl_AddRef(iface);
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
@ -70,37 +70,44 @@ HRESULT WINAPI IDirect3DSurface9Impl_GetDevice(LPDIRECT3DSURFACE9 iface, IDirect
|
|||
|
||||
HRESULT WINAPI IDirect3DSurface9Impl_SetPrivateData(LPDIRECT3DSURFACE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DSurface_SetPrivateData(This->wineD3DSurface, refguid, pData, SizeOfData, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DSurface9Impl_GetPrivateData(LPDIRECT3DSURFACE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DSurface_GetPrivateData(This->wineD3DSurface, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DSurface9Impl_FreePrivateData(LPDIRECT3DSURFACE9 iface, REFGUID refguid) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DSurface_FreePrivateData(This->wineD3DSurface, refguid);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DSurface9Impl_SetPriority(LPDIRECT3DSURFACE9 iface, DWORD PriorityNew) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DSurface_SetPriority(This->wineD3DSurface, PriorityNew);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DSurface9Impl_GetPriority(LPDIRECT3DSURFACE9 iface) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DSurface_GetPriority(This->wineD3DSurface);
|
||||
}
|
||||
|
||||
void WINAPI IDirect3DSurface9Impl_PreLoad(LPDIRECT3DSURFACE9 iface) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
IWineD3DSurface_PreLoad(This->wineD3DSurface);
|
||||
return ;
|
||||
}
|
||||
|
||||
D3DRESOURCETYPE WINAPI IDirect3DSurface9Impl_GetType(LPDIRECT3DSURFACE9 iface) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DSurface_GetType(This->wineD3DSurface);
|
||||
}
|
||||
|
||||
|
@ -108,13 +115,12 @@ D3DRESOURCETYPE WINAPI IDirect3DSurface9Impl_GetType(LPDIRECT3DSURFACE9 iface) {
|
|||
HRESULT WINAPI IDirect3DSurface9Impl_GetContainer(LPDIRECT3DSURFACE9 iface, REFIID riid, void** ppContainer) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
HRESULT res;
|
||||
|
||||
/* The container returned from IWineD3DSurface_GetContainer is either a IWineD3DDevice,
|
||||
one of the subclasses of IWineD3DBaseTexture or a IWineD3DSwapChain */
|
||||
IUnknown *IWineContainer = NULL;
|
||||
|
||||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
/* The container returned from IWineD3DSurface_GetContainer is either a IWineD3DDevice,
|
||||
one of the subclasses of IWineD3DBaseTexture or a IWineD3DSwapChain */
|
||||
/* Get the IUnknown container. */
|
||||
res = IWineD3DSurface_GetContainer(This->wineD3DSurface, &IID_IUnknown, (void **)&IWineContainer);
|
||||
if (res == D3D_OK && IWineContainer != NULL) {
|
||||
|
@ -156,6 +162,7 @@ HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3DSURFAC
|
|||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
WINED3DSURFACE_DESC wined3ddesc;
|
||||
UINT tmpInt = -1;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
|
||||
wined3ddesc.Format = &pDesc->Format;
|
||||
|
@ -173,21 +180,26 @@ HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3DSURFAC
|
|||
|
||||
HRESULT WINAPI IDirect3DSurface9Impl_LockRect(LPDIRECT3DSURFACE9 iface, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
TRACE("(%p) calling IWineD3DSurface_LockRect %p %p %p %ld\n", This, This->wineD3DSurface, pLockedRect, pRect, Flags);
|
||||
return IWineD3DSurface_LockRect(This->wineD3DSurface, pLockedRect, pRect, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DSurface9Impl_UnlockRect(LPDIRECT3DSURFACE9 iface) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DSurface_UnlockRect(This->wineD3DSurface);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DSurface9Impl_GetDC(LPDIRECT3DSURFACE9 iface, HDC* phdc) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DSurface_GetDC(This->wineD3DSurface, phdc);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DSurface9Impl_ReleaseDC(LPDIRECT3DSURFACE9 iface, HDC hdc) {
|
||||
IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DSurface_ReleaseDC(This->wineD3DSurface, hdc);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
* IDirect3DTexture9 implementation
|
||||
*
|
||||
* Copyright 2002-2005 Jason Edmeades
|
||||
* Raphael Junqueira
|
||||
* Copyright 2002-2005 Raphael Junqueira
|
||||
* Copyright 2005 Oliver Stieber
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -22,7 +23,7 @@
|
|||
#include "config.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
/* IDirect3DTexture9 IUnknown parts follow: */
|
||||
HRESULT WINAPI IDirect3DTexture9Impl_QueryInterface(LPDIRECT3DTEXTURE9 iface, REFIID riid, LPVOID* ppobj) {
|
||||
|
@ -32,7 +33,7 @@ HRESULT WINAPI IDirect3DTexture9Impl_QueryInterface(LPDIRECT3DTEXTURE9 iface, RE
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DResource9)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DBaseTexture9)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DTexture9)) {
|
||||
IDirect3DTexture9Impl_AddRef(iface);
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
@ -147,7 +148,7 @@ HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(LPDIRECT3DTEXTURE9 iface, UINT
|
|||
wined3ddesc.Type = &pDesc->Type;
|
||||
wined3ddesc.Usage = &pDesc->Usage;
|
||||
wined3ddesc.Pool = &pDesc->Pool;
|
||||
wined3ddesc.Size = &tmpInt;
|
||||
wined3ddesc.Size = &tmpInt; /* required for d3d8 */
|
||||
wined3ddesc.MultiSampleType = &pDesc->MultiSampleType;
|
||||
wined3ddesc.MultiSampleQuality = &pDesc->MultiSampleQuality;
|
||||
wined3ddesc.Width = &pDesc->Width;
|
||||
|
@ -184,7 +185,6 @@ HRESULT WINAPI IDirect3DTexture9Impl_AddDirtyRect(LPDIRECT3DTEXTURE9 iface, CONS
|
|||
return IWineD3DTexture_AddDirtyRect(This->wineD3DTexture, pDirtyRect);
|
||||
}
|
||||
|
||||
|
||||
IDirect3DTexture9Vtbl Direct3DTexture9_Vtbl =
|
||||
{
|
||||
IDirect3DTexture9Impl_QueryInterface,
|
||||
|
@ -198,6 +198,7 @@ IDirect3DTexture9Vtbl Direct3DTexture9_Vtbl =
|
|||
IDirect3DTexture9Impl_GetPriority,
|
||||
IDirect3DTexture9Impl_PreLoad,
|
||||
IDirect3DTexture9Impl_GetType,
|
||||
|
||||
IDirect3DTexture9Impl_SetLOD,
|
||||
IDirect3DTexture9Impl_GetLOD,
|
||||
IDirect3DTexture9Impl_GetLevelCount,
|
||||
|
@ -219,8 +220,11 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9 iface, UIN
|
|||
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
|
||||
HRESULT hrc = D3D_OK;
|
||||
|
||||
TRACE("(%p) : W(%d) H(%d), Lvl(%d) d(%ld), Fmt(%u), Pool(%d)\n", This, Width, Height, Levels, Usage, Format, Pool);
|
||||
|
||||
/* Allocate the storage for the device */
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DTexture9Impl));
|
||||
|
||||
if (NULL == object) {
|
||||
FIXME("Allocation of memory failed\n");
|
||||
*ppTexture = NULL;
|
||||
|
@ -230,7 +234,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9 iface, UIN
|
|||
object->lpVtbl = &Direct3DTexture9_Vtbl;
|
||||
object->ref = 1;
|
||||
hrc = IWineD3DDevice_CreateTexture(This->WineD3DDevice, Width, Height, Levels, Usage,
|
||||
Format, Pool, &(object->wineD3DTexture), pSharedHandle, (IUnknown *)object, D3D9CB_CreateSurface);
|
||||
Format, Pool, &object->wineD3DTexture, pSharedHandle, (IUnknown *)object, D3D9CB_CreateSurface);
|
||||
|
||||
if (FAILED(hrc)) {
|
||||
/* free up object */
|
||||
|
@ -240,5 +244,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9 iface, UIN
|
|||
} else {
|
||||
*ppTexture= (LPDIRECT3DTEXTURE9) object;
|
||||
}
|
||||
|
||||
TRACE("(%p) Created Texture %p, %p\n",This,object,object->wineD3DTexture);
|
||||
return hrc;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
* IDirect3DVertexBuffer9 implementation
|
||||
*
|
||||
* Copyright 2002-2004 Jason Edmeades
|
||||
* Raphael Junqueira
|
||||
* Copyright 2002-2004 Raphael Junqueira
|
||||
* Copyright 2005 Oliver Stieber
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -22,7 +23,7 @@
|
|||
#include "config.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
/* IDirect3DVertexBuffer9 IUnknown parts follow: */
|
||||
HRESULT WINAPI IDirect3DVertexBuffer9Impl_QueryInterface(LPDIRECT3DVERTEXBUFFER9 iface, REFIID riid, LPVOID* ppobj) {
|
||||
|
@ -31,7 +32,7 @@ HRESULT WINAPI IDirect3DVertexBuffer9Impl_QueryInterface(LPDIRECT3DVERTEXBUFFER9
|
|||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DResource9)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DVertexBuffer9)) {
|
||||
IDirect3DVertexBuffer9Impl_AddRef(iface);
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
@ -65,58 +66,69 @@ ULONG WINAPI IDirect3DVertexBuffer9Impl_Release(LPDIRECT3DVERTEXBUFFER9 iface) {
|
|||
/* IDirect3DVertexBuffer9 IDirect3DResource9 Interface follow: */
|
||||
HRESULT WINAPI IDirect3DVertexBuffer9Impl_GetDevice(LPDIRECT3DVERTEXBUFFER9 iface, IDirect3DDevice9** ppDevice) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVertexBuffer9Impl_SetPrivateData(LPDIRECT3DVERTEXBUFFER9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVertexBuffer_SetPrivateData(This->wineD3DVertexBuffer, refguid, pData, SizeOfData, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVertexBuffer9Impl_GetPrivateData(LPDIRECT3DVERTEXBUFFER9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVertexBuffer_GetPrivateData(This->wineD3DVertexBuffer, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVertexBuffer9Impl_FreePrivateData(LPDIRECT3DVERTEXBUFFER9 iface, REFGUID refguid) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVertexBuffer_FreePrivateData(This->wineD3DVertexBuffer, refguid);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DVertexBuffer9Impl_SetPriority(LPDIRECT3DVERTEXBUFFER9 iface, DWORD PriorityNew) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVertexBuffer_SetPriority(This->wineD3DVertexBuffer, PriorityNew);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DVertexBuffer9Impl_GetPriority(LPDIRECT3DVERTEXBUFFER9 iface) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVertexBuffer_GetPriority(This->wineD3DVertexBuffer);
|
||||
}
|
||||
|
||||
void WINAPI IDirect3DVertexBuffer9Impl_PreLoad(LPDIRECT3DVERTEXBUFFER9 iface) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
IWineD3DVertexBuffer_PreLoad(This->wineD3DVertexBuffer);
|
||||
return ;
|
||||
}
|
||||
|
||||
D3DRESOURCETYPE WINAPI IDirect3DVertexBuffer9Impl_GetType(LPDIRECT3DVERTEXBUFFER9 iface) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVertexBuffer_GetType(This->wineD3DVertexBuffer);
|
||||
}
|
||||
|
||||
/* IDirect3DVertexBuffer9 Interface follow: */
|
||||
HRESULT WINAPI IDirect3DVertexBuffer9Impl_Lock(LPDIRECT3DVERTEXBUFFER9 iface, UINT OffsetToLock, UINT SizeToLock, void** ppbData, DWORD Flags) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVertexBuffer_Lock(This->wineD3DVertexBuffer, OffsetToLock, SizeToLock, (BYTE **)ppbData, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVertexBuffer9Impl_Unlock(LPDIRECT3DVERTEXBUFFER9 iface) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVertexBuffer_Unlock(This->wineD3DVertexBuffer);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVertexBuffer9Impl_GetDesc(LPDIRECT3DVERTEXBUFFER9 iface, D3DVERTEXBUFFER_DESC* pDesc) {
|
||||
IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVertexBuffer_GetDesc(This->wineD3DVertexBuffer, pDesc);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "config.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
/* IDirect3DVolume9 IUnknown parts follow: */
|
||||
HRESULT WINAPI IDirect3DVolume9Impl_QueryInterface(LPDIRECT3DVOLUME9 iface, REFIID riid, LPVOID* ppobj) {
|
||||
|
@ -30,7 +30,7 @@ HRESULT WINAPI IDirect3DVolume9Impl_QueryInterface(LPDIRECT3DVOLUME9 iface, REFI
|
|||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DVolume9)) {
|
||||
IDirect3DVolume9Impl_AddRef(iface);
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
@ -74,24 +74,28 @@ HRESULT WINAPI IDirect3DVolume9Impl_GetDevice(LPDIRECT3DVOLUME9 iface, IDirect3D
|
|||
|
||||
HRESULT WINAPI IDirect3DVolume9Impl_SetPrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
|
||||
IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolume_SetPrivateData(This->wineD3DVolume, refguid, pData, SizeOfData, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVolume9Impl_GetPrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
|
||||
IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolume_GetPrivateData(This->wineD3DVolume, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVolume9Impl_FreePrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid) {
|
||||
IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolume_FreePrivateData(This->wineD3DVolume, refguid);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVolume9Impl_GetContainer(LPDIRECT3DVOLUME9 iface, REFIID riid, void** ppContainer) {
|
||||
IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
|
||||
HRESULT res;
|
||||
|
||||
IUnknown *IWineContainer = NULL;
|
||||
|
||||
TRACE("(%p) Relay\n", This);
|
||||
res = IWineD3DVolume_GetContainer(This->wineD3DVolume, riid, (void **)&IWineContainer);
|
||||
|
||||
/* If this works, the only valid container is a child of resource (volumetexture) */
|
||||
|
@ -108,6 +112,8 @@ HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(LPDIRECT3DVOLUME9 iface, D3DVOLUME_D
|
|||
WINED3DVOLUME_DESC wined3ddesc;
|
||||
UINT tmpInt = -1;
|
||||
|
||||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
|
||||
wined3ddesc.Format = &pDesc->Format;
|
||||
wined3ddesc.Type = &pDesc->Type;
|
||||
|
@ -123,11 +129,13 @@ HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(LPDIRECT3DVOLUME9 iface, D3DVOLUME_D
|
|||
|
||||
HRESULT WINAPI IDirect3DVolume9Impl_LockBox(LPDIRECT3DVOLUME9 iface, D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) {
|
||||
IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
|
||||
TRACE("(%p) relay %p %p %p %ld\n", This, This->wineD3DVolume, pLockedVolume, pBox, Flags);
|
||||
return IWineD3DVolume_LockBox(This->wineD3DVolume, pLockedVolume, pBox, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVolume9Impl_UnlockBox(LPDIRECT3DVOLUME9 iface) {
|
||||
IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
|
||||
TRACE("(%p) relay %p\n", This, This->wineD3DVolume);
|
||||
return IWineD3DVolume_UnlockBox(This->wineD3DVolume);
|
||||
}
|
||||
|
||||
|
@ -146,6 +154,7 @@ IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl =
|
|||
IDirect3DVolume9Impl_UnlockBox
|
||||
};
|
||||
|
||||
|
||||
/* Internal function called back during the CreateVolumeTexture */
|
||||
HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth,
|
||||
D3DFORMAT Format, D3DPOOL Pool, DWORD Usage,
|
||||
|
@ -166,14 +175,15 @@ HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height,
|
|||
object->lpVtbl = &Direct3DVolume9_Vtbl;
|
||||
object->ref = 1;
|
||||
hrc = IWineD3DDevice_CreateVolume(This->WineD3DDevice, Width, Height, Depth, Usage, Format,
|
||||
Pool, ppVolume, pSharedHandle, (IUnknown *)object);
|
||||
Pool, &object->wineD3DVolume, pSharedHandle, (IUnknown *)object);
|
||||
if (hrc != D3D_OK) {
|
||||
/* free up object */
|
||||
FIXME("(%p) call to IWineD3DDevice_CreateVolume failed\n", This);
|
||||
HeapFree(GetProcessHeap(), 0, object);
|
||||
*ppVolume = NULL;
|
||||
} else {
|
||||
*ppVolume = (IWineD3DVolume *)object;
|
||||
*ppVolume = (IWineD3DVolume *)object->wineD3DVolume;
|
||||
}
|
||||
TRACE("(%p) Created volume %p\n", This, *ppVolume);
|
||||
return hrc;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "config.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
/* IDirect3DVolumeTexture9 IUnknown parts follow: */
|
||||
HRESULT WINAPI IDirect3DVolumeTexture9Impl_QueryInterface(LPDIRECT3DVOLUMETEXTURE9 iface, REFIID riid, LPVOID* ppobj) {
|
||||
|
@ -32,7 +32,7 @@ HRESULT WINAPI IDirect3DVolumeTexture9Impl_QueryInterface(LPDIRECT3DVOLUMETEXTUR
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DResource9)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DBaseTexture9)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DVolumeTexture9)) {
|
||||
IDirect3DVolumeTexture9Impl_AddRef(iface);
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
@ -66,72 +66,86 @@ ULONG WINAPI IDirect3DVolumeTexture9Impl_Release(LPDIRECT3DVOLUMETEXTURE9 iface)
|
|||
/* IDirect3DVolumeTexture9 IDirect3DResource9 Interface follow: */
|
||||
HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetDevice(LPDIRECT3DVOLUMETEXTURE9 iface, IDirect3DDevice9** ppDevice) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetPrivateData(LPDIRECT3DVOLUMETEXTURE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_SetPrivateData(This->wineD3DVolumeTexture, refguid, pData, SizeOfData, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetPrivateData(LPDIRECT3DVOLUMETEXTURE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_GetPrivateData(This->wineD3DVolumeTexture, refguid, pData, pSizeOfData);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVolumeTexture9Impl_FreePrivateData(LPDIRECT3DVOLUMETEXTURE9 iface, REFGUID refguid) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_FreePrivateData(This->wineD3DVolumeTexture, refguid);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DVolumeTexture9Impl_SetPriority(LPDIRECT3DVOLUMETEXTURE9 iface, DWORD PriorityNew) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_SetPriority(This->wineD3DVolumeTexture, PriorityNew);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DVolumeTexture9Impl_GetPriority(LPDIRECT3DVOLUMETEXTURE9 iface) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_GetPriority(This->wineD3DVolumeTexture);
|
||||
}
|
||||
|
||||
void WINAPI IDirect3DVolumeTexture9Impl_PreLoad(LPDIRECT3DVOLUMETEXTURE9 iface) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_PreLoad(This->wineD3DVolumeTexture);
|
||||
}
|
||||
|
||||
D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture9Impl_GetType(LPDIRECT3DVOLUMETEXTURE9 iface) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_GetType(This->wineD3DVolumeTexture);
|
||||
}
|
||||
|
||||
/* IDirect3DVolumeTexture9 IDirect3DBaseTexture9 Interface follow: */
|
||||
DWORD WINAPI IDirect3DVolumeTexture9Impl_SetLOD(LPDIRECT3DVOLUMETEXTURE9 iface, DWORD LODNew) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_SetLOD(This->wineD3DVolumeTexture, LODNew);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DVolumeTexture9Impl_GetLOD(LPDIRECT3DVOLUMETEXTURE9 iface) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_GetLOD(This->wineD3DVolumeTexture);
|
||||
}
|
||||
|
||||
DWORD WINAPI IDirect3DVolumeTexture9Impl_GetLevelCount(LPDIRECT3DVOLUMETEXTURE9 iface) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_GetLevelCount(This->wineD3DVolumeTexture);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetAutoGenFilterType(LPDIRECT3DVOLUMETEXTURE9 iface, D3DTEXTUREFILTERTYPE FilterType) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_SetAutoGenFilterType(This->wineD3DVolumeTexture, FilterType);
|
||||
}
|
||||
|
||||
D3DTEXTUREFILTERTYPE WINAPI IDirect3DVolumeTexture9Impl_GetAutoGenFilterType(LPDIRECT3DVOLUMETEXTURE9 iface) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_GetAutoGenFilterType(This->wineD3DVolumeTexture);
|
||||
}
|
||||
|
||||
void WINAPI IDirect3DVolumeTexture9Impl_GenerateMipSubLevels(LPDIRECT3DVOLUMETEXTURE9 iface) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_GenerateMipSubLevels(This->wineD3DVolumeTexture);
|
||||
}
|
||||
|
||||
|
@ -141,6 +155,8 @@ HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE9
|
|||
WINED3DVOLUME_DESC wined3ddesc;
|
||||
UINT tmpInt = -1;
|
||||
|
||||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
|
||||
wined3ddesc.Format = &pDesc->Format;
|
||||
wined3ddesc.Type = &pDesc->Type;
|
||||
|
@ -157,8 +173,10 @@ HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE9
|
|||
HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetVolumeLevel(LPDIRECT3DVOLUMETEXTURE9 iface, UINT Level, IDirect3DVolume9** ppVolumeLevel) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
HRESULT hrc = D3D_OK;
|
||||
|
||||
IWineD3DVolume *myVolume = NULL;
|
||||
|
||||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
hrc = IWineD3DVolumeTexture_GetVolumeLevel(This->wineD3DVolumeTexture, Level, &myVolume);
|
||||
if (hrc == D3D_OK && NULL != ppVolumeLevel) {
|
||||
IWineD3DVolumeTexture_GetParent(myVolume, (IUnknown **)ppVolumeLevel);
|
||||
|
@ -169,16 +187,19 @@ HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetVolumeLevel(LPDIRECT3DVOLUMETEXTUR
|
|||
|
||||
HRESULT WINAPI IDirect3DVolumeTexture9Impl_LockBox(LPDIRECT3DVOLUMETEXTURE9 iface, UINT Level, D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay %p %p %p %ld\n", This, This->wineD3DVolumeTexture, pLockedVolume, pBox,Flags);
|
||||
return IWineD3DVolumeTexture_LockBox(This->wineD3DVolumeTexture, Level, pLockedVolume, pBox, Flags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVolumeTexture9Impl_UnlockBox(LPDIRECT3DVOLUMETEXTURE9 iface, UINT Level) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay %p %d\n", This, This->wineD3DVolumeTexture, Level);
|
||||
return IWineD3DVolumeTexture_UnlockBox(This->wineD3DVolumeTexture, Level);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirect3DVolumeTexture9Impl_AddDirtyBox(LPDIRECT3DVOLUMETEXTURE9 iface, CONST D3DBOX* pDirtyBox) {
|
||||
IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
|
||||
TRACE("(%p) Relay\n", This);
|
||||
return IWineD3DVolumeTexture_AddDirtyBox(This->wineD3DVolumeTexture, pDirtyBox);
|
||||
}
|
||||
|
||||
|
@ -220,6 +241,8 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9 ifac
|
|||
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
|
||||
HRESULT hrc = D3D_OK;
|
||||
|
||||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
/* Allocate the storage for the device */
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DVolumeTexture9Impl));
|
||||
if (NULL == object) {
|
||||
|
@ -231,7 +254,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9 ifac
|
|||
object->lpVtbl = &Direct3DVolumeTexture9_Vtbl;
|
||||
object->ref = 1;
|
||||
hrc = IWineD3DDevice_CreateVolumeTexture(This->WineD3DDevice, Width, Height, Depth, Levels, Usage,
|
||||
Format, Pool, &(object->wineD3DVolumeTexture), pSharedHandle,
|
||||
Format, Pool, &object->wineD3DVolumeTexture, pSharedHandle,
|
||||
(IUnknown *)object, D3D9CB_CreateVolume);
|
||||
|
||||
|
||||
|
@ -243,5 +266,6 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9 ifac
|
|||
} else {
|
||||
*ppVolumeTexture = (LPDIRECT3DVOLUMETEXTURE9) object;
|
||||
}
|
||||
TRACE("(%p) returning %p\n", This , *ppVolumeTexture);
|
||||
return hrc;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "config.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
/**
|
||||
* DirectX9 SDK download
|
||||
|
|
Loading…
Reference in New Issue