push eb25bf65c4616aa55a810ed5c29198b1a080b208
[wine/hacks.git] / dlls / d3d10core / inputlayout.c
blob034a642d199bc385ceb97cbf2bcd4be8328cba6d
1 /*
2 * Copyright 2009 Henri Verbeet for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include "config.h"
21 #include "wine/port.h"
23 #include "d3d10core_private.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(d3d10core);
27 /* IUnknown methods */
29 static HRESULT STDMETHODCALLTYPE d3d10_input_layout_QueryInterface(ID3D10InputLayout *iface,
30 REFIID riid, void **object)
32 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
34 if (IsEqualGUID(riid, &IID_ID3D10InputLayout)
35 || IsEqualGUID(riid, &IID_ID3D10DeviceChild)
36 || IsEqualGUID(riid, &IID_IUnknown))
38 IUnknown_AddRef(iface);
39 *object = iface;
40 return S_OK;
43 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
45 *object = NULL;
46 return E_NOINTERFACE;
49 static ULONG STDMETHODCALLTYPE d3d10_input_layout_AddRef(ID3D10InputLayout *iface)
51 struct d3d10_input_layout *This = (struct d3d10_input_layout *)iface;
52 ULONG refcount = InterlockedIncrement(&This->refcount);
54 TRACE("%p increasing refcount to %u\n", This, refcount);
56 return refcount;
59 static ULONG STDMETHODCALLTYPE d3d10_input_layout_Release(ID3D10InputLayout *iface)
61 struct d3d10_input_layout *This = (struct d3d10_input_layout *)iface;
62 ULONG refcount = InterlockedDecrement(&This->refcount);
64 TRACE("%p decreasing refcount to %u\n", This, refcount);
66 if (!refcount)
68 HeapFree(GetProcessHeap(), 0, This);
71 return refcount;
74 /* ID3D10DeviceChild methods */
76 static void STDMETHODCALLTYPE d3d10_input_layout_GetDevice(ID3D10InputLayout *iface, ID3D10Device **device)
78 FIXME("iface %p, device %p stub!\n", iface, device);
81 static HRESULT STDMETHODCALLTYPE d3d10_input_layout_GetPrivateData(ID3D10InputLayout *iface,
82 REFGUID guid, UINT *data_size, void *data)
84 FIXME("iface %p, guid %s, data_size %p, data %p stub!\n",
85 iface, debugstr_guid(guid), data_size, data);
87 return E_NOTIMPL;
90 static HRESULT STDMETHODCALLTYPE d3d10_input_layout_SetPrivateData(ID3D10InputLayout *iface,
91 REFGUID guid, UINT data_size, const void *data)
93 FIXME("iface %p, guid %s, data_size %u, data %p stub!\n",
94 iface, debugstr_guid(guid), data_size, data);
96 return E_NOTIMPL;
99 static HRESULT STDMETHODCALLTYPE d3d10_input_layout_SetPrivateDataInterface(ID3D10InputLayout *iface,
100 REFGUID guid, const IUnknown *data)
102 FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data);
104 return E_NOTIMPL;
107 const struct ID3D10InputLayoutVtbl d3d10_input_layout_vtbl =
109 /* IUnknown methods */
110 d3d10_input_layout_QueryInterface,
111 d3d10_input_layout_AddRef,
112 d3d10_input_layout_Release,
113 /* ID3D10DeviceChild methods */
114 d3d10_input_layout_GetDevice,
115 d3d10_input_layout_GetPrivateData,
116 d3d10_input_layout_SetPrivateData,
117 d3d10_input_layout_SetPrivateDataInterface,