2 * IDirect3DBaseTexture8 implementation
4 * Copyright 2002 Jason Edmeades
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "wine/debug.h"
27 #include "d3d8_private.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
31 /* IDirect3DBaseTexture8 (Inherited from IUnknown) */
32 HRESULT WINAPI IDirect3DBaseTexture8Impl_QueryInterface(LPDIRECT3DBASETEXTURE8 iface,REFIID riid,LPVOID *ppobj)
34 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
35 TRACE("(%p) : QueryInterface\n", This);
36 if (IsEqualGUID(riid, &IID_IUnknown)
37 || IsEqualGUID(riid, &IID_IDirect3DResource8)
38 || IsEqualGUID(riid, &IID_IDirect3DBaseTexture8)) {
39 IDirect3DBaseTexture8Impl_AddRef(iface);
44 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
48 ULONG WINAPI IDirect3DBaseTexture8Impl_AddRef(LPDIRECT3DBASETEXTURE8 iface) {
49 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
50 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
54 ULONG WINAPI IDirect3DBaseTexture8Impl_Release(LPDIRECT3DBASETEXTURE8 iface) {
55 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
56 ULONG ref = --This->ref;
57 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
59 HeapFree(GetProcessHeap(), 0, This);
63 /* IDirect3DBaseTexture8 (Inherited from IDirect3DResource8) */
64 HRESULT WINAPI IDirect3DBaseTexture8Impl_GetDevice(LPDIRECT3DBASETEXTURE8 iface, IDirect3DDevice8** ppDevice) {
65 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
66 TRACE("(%p) : returning %p\n", This, This->Device);
67 *ppDevice = (LPDIRECT3DDEVICE8) This->Device;
69 * Note Calling this method will increase the internal reference count
70 * on the IDirect3DDevice8 interface.
72 IDirect3DDevice8Impl_AddRef(*ppDevice);
75 HRESULT WINAPI IDirect3DBaseTexture8Impl_SetPrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
76 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
77 FIXME("(%p) : stub\n", This); return D3D_OK;
79 HRESULT WINAPI IDirect3DBaseTexture8Impl_GetPrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
80 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
81 FIXME("(%p) : stub\n", This); return D3D_OK;
83 HRESULT WINAPI IDirect3DBaseTexture8Impl_FreePrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid) {
84 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
85 FIXME("(%p) : stub\n", This); return D3D_OK;
87 DWORD WINAPI IDirect3DBaseTexture8Impl_SetPriority(LPDIRECT3DBASETEXTURE8 iface, DWORD PriorityNew) {
88 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
89 FIXME("(%p) : stub\n", This); return D3D_OK;
91 DWORD WINAPI IDirect3DBaseTexture8Impl_GetPriority(LPDIRECT3DBASETEXTURE8 iface) {
92 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
93 FIXME("(%p) : stub\n", This); return D3D_OK;
95 void WINAPI IDirect3DBaseTexture8Impl_PreLoad(LPDIRECT3DBASETEXTURE8 iface) {
96 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
97 FIXME("(%p) : stub\n", This);
99 D3DRESOURCETYPE WINAPI IDirect3DBaseTexture8Impl_GetType(LPDIRECT3DBASETEXTURE8 iface) {
100 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
101 TRACE("(%p) : returning %d\n", This, This->ResourceType);
102 return This->ResourceType;
105 /* IDirect3DBaseTexture8 */
106 DWORD WINAPI IDirect3DBaseTexture8Impl_SetLOD(LPDIRECT3DBASETEXTURE8 iface, DWORD LODNew) {
107 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
108 FIXME("(%p) : stub\n", This); return D3D_OK;
110 DWORD WINAPI IDirect3DBaseTexture8Impl_GetLOD(LPDIRECT3DBASETEXTURE8 iface) {
111 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
112 FIXME("(%p) : stub\n", This); return D3D_OK;
114 DWORD WINAPI IDirect3DBaseTexture8Impl_GetLevelCount(LPDIRECT3DBASETEXTURE8 iface) {
115 ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
116 FIXME("(%p) : stub\n", This); return D3D_OK;
119 ICOM_VTABLE(IDirect3DBaseTexture8) Direct3DBaseTexture8_Vtbl =
121 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
122 IDirect3DBaseTexture8Impl_QueryInterface,
123 IDirect3DBaseTexture8Impl_AddRef,
124 IDirect3DBaseTexture8Impl_Release,
125 IDirect3DBaseTexture8Impl_GetDevice,
126 IDirect3DBaseTexture8Impl_SetPrivateData,
127 IDirect3DBaseTexture8Impl_GetPrivateData,
128 IDirect3DBaseTexture8Impl_FreePrivateData,
129 IDirect3DBaseTexture8Impl_SetPriority,
130 IDirect3DBaseTexture8Impl_GetPriority,
131 IDirect3DBaseTexture8Impl_PreLoad,
132 IDirect3DBaseTexture8Impl_GetType,
133 IDirect3DBaseTexture8Impl_SetLOD,
134 IDirect3DBaseTexture8Impl_GetLOD,
135 IDirect3DBaseTexture8Impl_GetLevelCount,