2 * Implementation of IDirect3DRM Interface
4 * Copyright 2010, 2012 Christian Costa
5 * Copyright 2011 André Hentschel
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/debug.h"
31 #include "d3drm_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(d3drm
);
35 static const char* get_IID_string(const GUID
* guid
)
37 if (IsEqualGUID(guid
, &IID_IDirect3DRMFrame
))
38 return "IID_IDirect3DRMFrame";
39 else if (IsEqualGUID(guid
, &IID_IDirect3DRMFrame2
))
40 return "IID_IDirect3DRMFrame2";
41 else if (IsEqualGUID(guid
, &IID_IDirect3DRMFrame3
))
42 return "IID_IDirect3DRMFrame3";
43 else if (IsEqualGUID(guid
, &IID_IDirect3DRMMeshBuilder
))
44 return "IID_IDirect3DRMMeshBuilder";
45 else if (IsEqualGUID(guid
, &IID_IDirect3DRMMeshBuilder2
))
46 return "IID_IDirect3DRMMeshBuilder2";
47 else if (IsEqualGUID(guid
, &IID_IDirect3DRMMeshBuilder3
))
48 return "IID_IDirect3DRMMeshBuilder3";
54 IDirect3DRM IDirect3DRM_iface
;
55 IDirect3DRM2 IDirect3DRM2_iface
;
56 IDirect3DRM3 IDirect3DRM3_iface
;
60 static inline IDirect3DRMImpl
*impl_from_IDirect3DRM(IDirect3DRM
*iface
)
62 return CONTAINING_RECORD(iface
, IDirect3DRMImpl
, IDirect3DRM_iface
);
65 static inline IDirect3DRMImpl
*impl_from_IDirect3DRM2(IDirect3DRM2
*iface
)
67 return CONTAINING_RECORD(iface
, IDirect3DRMImpl
, IDirect3DRM2_iface
);
70 static inline IDirect3DRMImpl
*impl_from_IDirect3DRM3(IDirect3DRM3
*iface
)
72 return CONTAINING_RECORD(iface
, IDirect3DRMImpl
, IDirect3DRM3_iface
);
75 /*** IUnknown methods ***/
76 static HRESULT WINAPI
IDirect3DRMImpl_QueryInterface(IDirect3DRM
* iface
, REFIID riid
, void** ppvObject
)
78 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
80 TRACE("(%p/%p)->(%s,%p)\n", iface
, This
, debugstr_guid(riid
), ppvObject
);
84 if(IsEqualGUID(riid
, &IID_IUnknown
) ||
85 IsEqualGUID(riid
, &IID_IDirect3DRM
))
87 *ppvObject
= &This
->IDirect3DRM_iface
;
89 else if(IsEqualGUID(riid
, &IID_IDirect3DRM2
))
91 *ppvObject
= &This
->IDirect3DRM2_iface
;
93 else if(IsEqualGUID(riid
, &IID_IDirect3DRM3
))
95 *ppvObject
= &This
->IDirect3DRM3_iface
;
99 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
100 return E_NOINTERFACE
;
103 IDirect3DRM_AddRef(iface
);
107 static ULONG WINAPI
IDirect3DRMImpl_AddRef(IDirect3DRM
* iface
)
109 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
110 ULONG ref
= InterlockedIncrement(&This
->ref
);
112 TRACE("(%p/%p)->(): new ref = %d\n", iface
, This
, ref
);
117 static ULONG WINAPI
IDirect3DRMImpl_Release(IDirect3DRM
* iface
)
119 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
120 ULONG ref
= InterlockedDecrement(&This
->ref
);
122 TRACE("(%p/%p)->(): new ref = %d\n", iface
, This
, ref
);
125 HeapFree(GetProcessHeap(), 0, This
);
130 /*** IDirect3DRM methods ***/
131 static HRESULT WINAPI
IDirect3DRMImpl_CreateObject(IDirect3DRM
* iface
, REFCLSID rclsid
, LPUNKNOWN pUnkOuter
, REFIID riid
, LPVOID
*ppvObj
)
133 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
135 FIXME("(%p/%p)->(%s,%p,%s,%p): stub\n", iface
, This
, debugstr_guid(rclsid
), pUnkOuter
, debugstr_guid(riid
), ppvObj
);
140 static HRESULT WINAPI
IDirect3DRMImpl_CreateFrame(IDirect3DRM
*iface
,
141 IDirect3DRMFrame
*parent_frame
, IDirect3DRMFrame
**frame
)
143 TRACE("iface %p, parent_frame %p, frame %p.\n", iface
, parent_frame
, frame
);
145 return Direct3DRMFrame_create(&IID_IDirect3DRMFrame
, (IUnknown
*)parent_frame
, (IUnknown
**)frame
);
148 static HRESULT WINAPI
IDirect3DRMImpl_CreateMesh(IDirect3DRM
*iface
, IDirect3DRMMesh
**mesh
)
150 IDirect3DRMImpl
*d3drm
= impl_from_IDirect3DRM(iface
);
152 TRACE("iface %p, mesh %p.\n", iface
, mesh
);
154 return IDirect3DRM3_CreateMesh(&d3drm
->IDirect3DRM3_iface
, mesh
);
157 static HRESULT WINAPI
IDirect3DRMImpl_CreateMeshBuilder(IDirect3DRM
*iface
, IDirect3DRMMeshBuilder
**mesh_builder
)
159 TRACE("iface %p, mesh_builder %p.\n", iface
, mesh_builder
);
161 return Direct3DRMMeshBuilder_create(&IID_IDirect3DRMMeshBuilder
, (IUnknown
**)mesh_builder
);
164 static HRESULT WINAPI
IDirect3DRMImpl_CreateFace(IDirect3DRM
* iface
, IDirect3DRMFace
**face
)
166 TRACE("iface %p, face %p.\n", iface
, face
);
168 return Direct3DRMFace_create(&IID_IDirect3DRMFace
, (IUnknown
**)face
);
171 static HRESULT WINAPI
IDirect3DRMImpl_CreateAnimation(IDirect3DRM
* iface
, LPDIRECT3DRMANIMATION
* ppAnimation
)
173 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
175 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, ppAnimation
);
180 static HRESULT WINAPI
IDirect3DRMImpl_CreateAnimationSet(IDirect3DRM
* iface
, LPDIRECT3DRMANIMATIONSET
* ppAnimationSet
)
182 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
184 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, ppAnimationSet
);
189 static HRESULT WINAPI
IDirect3DRMImpl_CreateTexture(IDirect3DRM
*iface
,
190 D3DRMIMAGE
*image
, IDirect3DRMTexture
**texture
)
192 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
194 FIXME("(%p/%p)->(%p,%p): partial stub\n", iface
, This
, image
, texture
);
196 return Direct3DRMTexture_create(&IID_IDirect3DRMTexture
, (IUnknown
**)texture
);
199 static HRESULT WINAPI
IDirect3DRMImpl_CreateLight(IDirect3DRM
*iface
,
200 D3DRMLIGHTTYPE type
, D3DCOLOR color
, IDirect3DRMLight
**light
)
202 IDirect3DRMImpl
*d3drm
= impl_from_IDirect3DRM(iface
);
204 TRACE("iface %p, type %#x, color 0x%08x, light %p.\n", iface
, type
, color
, light
);
206 return IDirect3DRM3_CreateLight(&d3drm
->IDirect3DRM3_iface
, type
, color
, light
);
209 static HRESULT WINAPI
IDirect3DRMImpl_CreateLightRGB(IDirect3DRM
*iface
, D3DRMLIGHTTYPE type
,
210 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
, IDirect3DRMLight
**light
)
212 IDirect3DRMImpl
*d3drm
= impl_from_IDirect3DRM(iface
);
214 TRACE("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p.\n",
215 iface
, type
, red
, green
, blue
, light
);
217 return IDirect3DRM3_CreateLightRGB(&d3drm
->IDirect3DRM3_iface
, type
, red
, green
, blue
, light
);
220 static HRESULT WINAPI
IDirect3DRMImpl_CreateMaterial(IDirect3DRM
* iface
, D3DVALUE power
, LPDIRECT3DRMMATERIAL
* material
)
222 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
224 TRACE("(%p/%p)->(%f,%p)\n", iface
, This
, power
, material
);
226 return IDirect3DRM3_CreateMaterial(&This
->IDirect3DRM3_iface
, power
, (LPDIRECT3DRMMATERIAL2
*)material
);
229 static HRESULT WINAPI
IDirect3DRMImpl_CreateDevice(IDirect3DRM
*iface
,
230 DWORD width
, DWORD height
, IDirect3DRMDevice
**device
)
232 FIXME("iface %p, width %u, height %u, device %p partial stub!\n", iface
, width
, height
, device
);
234 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice
, (IUnknown
**)device
);
237 static HRESULT WINAPI
IDirect3DRMImpl_CreateDeviceFromSurface(IDirect3DRM
*iface
, GUID
*pGUID
,
238 IDirectDraw
*pDD
, IDirectDrawSurface
*pDDSBack
, IDirect3DRMDevice
**ppDevice
)
240 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
242 FIXME("(%p/%p)->(%s,%p,%p,%p): partial stub\n", iface
, This
, debugstr_guid(pGUID
), pDD
,
245 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice
, (IUnknown
**)ppDevice
);
248 static HRESULT WINAPI
IDirect3DRMImpl_CreateDeviceFromD3D(IDirect3DRM
*iface
,
249 IDirect3D
*pD3D
, IDirect3DDevice
*pD3DDev
, IDirect3DRMDevice
**ppDevice
)
251 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
253 FIXME("(%p/%p)->(%p,%p,%p): partial stub\n", iface
, This
, pD3D
, pD3DDev
, ppDevice
);
255 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice
, (IUnknown
**)ppDevice
);
258 static HRESULT WINAPI
IDirect3DRMImpl_CreateDeviceFromClipper(IDirect3DRM
*iface
,
259 IDirectDrawClipper
*pDDClipper
, GUID
*pGUID
, int width
, int height
,
260 IDirect3DRMDevice
**ppDevice
)
262 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
264 FIXME("(%p/%p)->(%p,%s,%d,%d,%p): partial stub\n", iface
, This
, pDDClipper
,
265 debugstr_guid(pGUID
), width
, height
, ppDevice
);
267 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice
, (IUnknown
**)ppDevice
);
270 static HRESULT WINAPI
IDirect3DRMImpl_CreateTextureFromSurface(IDirect3DRM
*iface
,
271 IDirectDrawSurface
*pDDS
, IDirect3DRMTexture
**ppTexture
)
273 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
275 FIXME("(%p/%p)->(%p,%p): stub\n", iface
, This
, pDDS
, ppTexture
);
280 static HRESULT WINAPI
IDirect3DRMImpl_CreateShadow(IDirect3DRM
*iface
, IDirect3DRMVisual
*visual
,
281 IDirect3DRMLight
*light
, D3DVALUE px
, D3DVALUE py
, D3DVALUE pz
, D3DVALUE nx
, D3DVALUE ny
, D3DVALUE nz
,
282 IDirect3DRMVisual
**shadow
)
284 FIXME("iface %p, visual %p, light %p, px %.8e, py %.8e, pz %.8e, nx %.8e, ny %.8e, nz %.8e, shadow %p stub!\n",
285 iface
, visual
, light
, px
, py
, pz
, nx
, ny
, nz
, shadow
);
290 static HRESULT WINAPI
IDirect3DRMImpl_CreateViewport(IDirect3DRM
*iface
, IDirect3DRMDevice
*device
,
291 IDirect3DRMFrame
*camera
, DWORD x
, DWORD y
, DWORD width
, DWORD height
, IDirect3DRMViewport
**viewport
)
293 FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u, viewport %p partial stub!\n",
294 iface
, device
, camera
, x
, y
, width
, height
, viewport
);
296 return Direct3DRMViewport_create(&IID_IDirect3DRMViewport
, (IUnknown
**)viewport
);
299 static HRESULT WINAPI
IDirect3DRMImpl_CreateWrap(IDirect3DRM
*iface
, D3DRMWRAPTYPE type
, IDirect3DRMFrame
*frame
,
300 D3DVALUE ox
, D3DVALUE oy
, D3DVALUE oz
, D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
,
301 D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
, D3DVALUE ou
, D3DVALUE ov
, D3DVALUE su
, D3DVALUE sv
,
302 IDirect3DRMWrap
**wrap
)
304 FIXME("iface %p, type %#x, frame %p, ox %.8e, oy %.8e, oz %.8e, dx %.8e, dy %.8e, dz %.8e, "
305 "ux %.8e, uy %.8e, uz %.8e, ou %.8e, ov %.8e, su %.8e, sv %.8e, wrap %p stub!\n",
306 iface
, type
, frame
, ox
, oy
, oz
, dx
, dy
, dz
, ux
, uy
, uz
, ou
, ov
, su
, sv
, wrap
);
311 static HRESULT WINAPI
IDirect3DRMImpl_CreateUserVisual(IDirect3DRM
* iface
, D3DRMUSERVISUALCALLBACK cb
, LPVOID pArg
, LPDIRECT3DRMUSERVISUAL
* ppUserVisual
)
313 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
315 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface
, This
, cb
, pArg
, ppUserVisual
);
320 static HRESULT WINAPI
IDirect3DRMImpl_LoadTexture(IDirect3DRM
*iface
,
321 const char *filename
, IDirect3DRMTexture
**texture
)
323 FIXME("iface %p, filename %s, texture %p stub!\n", iface
, debugstr_a(filename
), texture
);
325 return Direct3DRMTexture_create(&IID_IDirect3DRMTexture
, (IUnknown
**)texture
);
328 static HRESULT WINAPI
IDirect3DRMImpl_LoadTextureFromResource(IDirect3DRM
*iface
,
329 HRSRC resource
, IDirect3DRMTexture
**texture
)
331 FIXME("iface %p, resource %p, texture %p stub!\n", iface
, resource
, texture
);
333 return Direct3DRMTexture_create(&IID_IDirect3DRMTexture
, (IUnknown
**)texture
);
336 static HRESULT WINAPI
IDirect3DRMImpl_SetSearchPath(IDirect3DRM
* iface
, LPCSTR path
)
338 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
340 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, path
);
345 static HRESULT WINAPI
IDirect3DRMImpl_AddSearchPath(IDirect3DRM
* iface
, LPCSTR path
)
347 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
349 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, path
);
354 static HRESULT WINAPI
IDirect3DRMImpl_GetSearchPath(IDirect3DRM
* iface
, DWORD
*size_return
, LPSTR path_return
)
356 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
358 FIXME("(%p/%p)->(%p,%s): stub\n", iface
, This
, size_return
, path_return
);
363 static HRESULT WINAPI
IDirect3DRMImpl_SetDefaultTextureColors(IDirect3DRM
* iface
, DWORD nb_colors
)
365 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
367 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, nb_colors
);
372 static HRESULT WINAPI
IDirect3DRMImpl_SetDefaultTextureShades(IDirect3DRM
* iface
, DWORD nb_shades
)
374 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
376 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, nb_shades
);
381 static HRESULT WINAPI
IDirect3DRMImpl_GetDevices(IDirect3DRM
* iface
, LPDIRECT3DRMDEVICEARRAY
* ppDeviceArray
)
383 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
385 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, ppDeviceArray
);
390 static HRESULT WINAPI
IDirect3DRMImpl_GetNamedObject(IDirect3DRM
*iface
,
391 const char *name
, IDirect3DRMObject
**object
)
393 FIXME("iface %p, name %s, object %p stub!\n", iface
, debugstr_a(name
), object
);
398 static HRESULT WINAPI
IDirect3DRMImpl_EnumerateObjects(IDirect3DRM
* iface
, D3DRMOBJECTCALLBACK cb
, LPVOID pArg
)
400 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
402 FIXME("(%p/%p)->(%p,%p): stub\n", iface
, This
, cb
, pArg
);
407 static HRESULT WINAPI
IDirect3DRMImpl_Load(IDirect3DRM
*iface
, void *source
, void *object_id
, IID
**iids
,
408 DWORD iid_count
, D3DRMLOADOPTIONS flags
, D3DRMLOADCALLBACK load_cb
, void *load_ctx
,
409 D3DRMLOADTEXTURECALLBACK load_tex_cb
, void *load_tex_ctx
, IDirect3DRMFrame
*parent_frame
)
411 IDirect3DRMImpl
*d3drm
= impl_from_IDirect3DRM(iface
);
412 IDirect3DRMFrame3
*parent_frame3
= NULL
;
413 HRESULT hr
= D3DRM_OK
;
415 TRACE("iface %p, source %p, object_id %p, iids %p, iid_count %u, flags %#x, "
416 "load_cb %p, load_ctx %p, load_tex_cb %p, load_tex_ctx %p, parent_frame %p.\n",
417 iface
, source
, object_id
, iids
, iid_count
, flags
,
418 load_cb
, load_ctx
, load_tex_cb
, load_tex_ctx
, parent_frame
);
421 hr
= IDirect3DRMFrame_QueryInterface(parent_frame
, &IID_IDirect3DRMFrame3
, (void **)&parent_frame3
);
423 hr
= IDirect3DRM3_Load(&d3drm
->IDirect3DRM3_iface
, source
, object_id
, iids
, iid_count
,
424 flags
, load_cb
, load_ctx
, load_tex_cb
, load_tex_ctx
, parent_frame3
);
426 IDirect3DRMFrame3_Release(parent_frame3
);
431 static HRESULT WINAPI
IDirect3DRMImpl_Tick(IDirect3DRM
* iface
, D3DVALUE tick
)
433 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM(iface
);
435 FIXME("(%p/%p)->(%f): stub\n", iface
, This
, tick
);
440 static const struct IDirect3DRMVtbl Direct3DRM_Vtbl
=
442 IDirect3DRMImpl_QueryInterface
,
443 IDirect3DRMImpl_AddRef
,
444 IDirect3DRMImpl_Release
,
445 IDirect3DRMImpl_CreateObject
,
446 IDirect3DRMImpl_CreateFrame
,
447 IDirect3DRMImpl_CreateMesh
,
448 IDirect3DRMImpl_CreateMeshBuilder
,
449 IDirect3DRMImpl_CreateFace
,
450 IDirect3DRMImpl_CreateAnimation
,
451 IDirect3DRMImpl_CreateAnimationSet
,
452 IDirect3DRMImpl_CreateTexture
,
453 IDirect3DRMImpl_CreateLight
,
454 IDirect3DRMImpl_CreateLightRGB
,
455 IDirect3DRMImpl_CreateMaterial
,
456 IDirect3DRMImpl_CreateDevice
,
457 IDirect3DRMImpl_CreateDeviceFromSurface
,
458 IDirect3DRMImpl_CreateDeviceFromD3D
,
459 IDirect3DRMImpl_CreateDeviceFromClipper
,
460 IDirect3DRMImpl_CreateTextureFromSurface
,
461 IDirect3DRMImpl_CreateShadow
,
462 IDirect3DRMImpl_CreateViewport
,
463 IDirect3DRMImpl_CreateWrap
,
464 IDirect3DRMImpl_CreateUserVisual
,
465 IDirect3DRMImpl_LoadTexture
,
466 IDirect3DRMImpl_LoadTextureFromResource
,
467 IDirect3DRMImpl_SetSearchPath
,
468 IDirect3DRMImpl_AddSearchPath
,
469 IDirect3DRMImpl_GetSearchPath
,
470 IDirect3DRMImpl_SetDefaultTextureColors
,
471 IDirect3DRMImpl_SetDefaultTextureShades
,
472 IDirect3DRMImpl_GetDevices
,
473 IDirect3DRMImpl_GetNamedObject
,
474 IDirect3DRMImpl_EnumerateObjects
,
475 IDirect3DRMImpl_Load
,
480 /*** IUnknown methods ***/
481 static HRESULT WINAPI
IDirect3DRM2Impl_QueryInterface(IDirect3DRM2
* iface
, REFIID riid
,
484 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
485 return IDirect3DRM_QueryInterface(&This
->IDirect3DRM_iface
, riid
, ppvObject
);
488 static ULONG WINAPI
IDirect3DRM2Impl_AddRef(IDirect3DRM2
* iface
)
490 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
491 return IDirect3DRM_AddRef(&This
->IDirect3DRM_iface
);
494 static ULONG WINAPI
IDirect3DRM2Impl_Release(IDirect3DRM2
* iface
)
496 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
497 return IDirect3DRM_Release(&This
->IDirect3DRM_iface
);
500 /*** IDirect3DRM2 methods ***/
501 static HRESULT WINAPI
IDirect3DRM2Impl_CreateObject(IDirect3DRM2
* iface
, REFCLSID rclsid
,
502 LPUNKNOWN pUnkOuter
, REFIID riid
,
505 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
507 FIXME("(%p/%p)->(%s,%p,%s,%p): stub\n", iface
, This
, debugstr_guid(rclsid
), pUnkOuter
,
508 debugstr_guid(riid
), ppvObj
);
513 static HRESULT WINAPI
IDirect3DRM2Impl_CreateFrame(IDirect3DRM2
*iface
,
514 IDirect3DRMFrame
*parent_frame
, IDirect3DRMFrame2
**frame
)
516 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
518 TRACE("(%p/%p)->(%p,%p)\n", iface
, This
, parent_frame
, frame
);
520 return Direct3DRMFrame_create(&IID_IDirect3DRMFrame2
, (IUnknown
*)parent_frame
, (IUnknown
**)frame
);
523 static HRESULT WINAPI
IDirect3DRM2Impl_CreateMesh(IDirect3DRM2
*iface
, IDirect3DRMMesh
**mesh
)
525 IDirect3DRMImpl
*d3drm
= impl_from_IDirect3DRM2(iface
);
527 TRACE("iface %p, mesh %p.\n", iface
, mesh
);
529 return IDirect3DRM3_CreateMesh(&d3drm
->IDirect3DRM3_iface
, mesh
);
532 static HRESULT WINAPI
IDirect3DRM2Impl_CreateMeshBuilder(IDirect3DRM2
*iface
, IDirect3DRMMeshBuilder2
**mesh_builder
)
534 TRACE("iface %p, mesh_builder %p.\n", iface
, mesh_builder
);
536 return Direct3DRMMeshBuilder_create(&IID_IDirect3DRMMeshBuilder2
, (IUnknown
**)mesh_builder
);
539 static HRESULT WINAPI
IDirect3DRM2Impl_CreateFace(IDirect3DRM2
*iface
, IDirect3DRMFace
**face
)
541 TRACE("iface %p, face %p.\n", iface
, face
);
543 return Direct3DRMFace_create(&IID_IDirect3DRMFace
, (IUnknown
**)face
);
546 static HRESULT WINAPI
IDirect3DRM2Impl_CreateAnimation(IDirect3DRM2
* iface
,
547 LPDIRECT3DRMANIMATION
* ppAnimation
)
549 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
551 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, ppAnimation
);
556 static HRESULT WINAPI
IDirect3DRM2Impl_CreateAnimationSet(IDirect3DRM2
* iface
,
557 LPDIRECT3DRMANIMATIONSET
* ppAnimationSet
)
559 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
561 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, ppAnimationSet
);
566 static HRESULT WINAPI
IDirect3DRM2Impl_CreateTexture(IDirect3DRM2
*iface
,
567 D3DRMIMAGE
*image
, IDirect3DRMTexture2
**texture
)
569 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
571 FIXME("(%p/%p)->(%p,%p): partial stub\n", iface
, This
, image
, texture
);
573 return Direct3DRMTexture_create(&IID_IDirect3DRMTexture2
, (IUnknown
**)texture
);
576 static HRESULT WINAPI
IDirect3DRM2Impl_CreateLight(IDirect3DRM2
*iface
,
577 D3DRMLIGHTTYPE type
, D3DCOLOR color
, IDirect3DRMLight
**light
)
579 IDirect3DRMImpl
*d3drm
= impl_from_IDirect3DRM2(iface
);
581 TRACE("iface %p, type %#x, color 0x%08x, light %p.\n", iface
, type
, color
, light
);
583 return IDirect3DRM3_CreateLight(&d3drm
->IDirect3DRM3_iface
, type
, color
, light
);
586 static HRESULT WINAPI
IDirect3DRM2Impl_CreateLightRGB(IDirect3DRM2
*iface
, D3DRMLIGHTTYPE type
,
587 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
, IDirect3DRMLight
**light
)
589 IDirect3DRMImpl
*d3drm
= impl_from_IDirect3DRM2(iface
);
591 TRACE("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p.\n",
592 iface
, type
, red
, green
, blue
, light
);
594 return IDirect3DRM3_CreateLightRGB(&d3drm
->IDirect3DRM3_iface
, type
, red
, green
, blue
, light
);
597 static HRESULT WINAPI
IDirect3DRM2Impl_CreateMaterial(IDirect3DRM2
* iface
, D3DVALUE power
,
598 LPDIRECT3DRMMATERIAL
* material
)
600 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
602 TRACE("(%p/%p)->(%f,%p)\n", iface
, This
, power
, material
);
604 return IDirect3DRM3_CreateMaterial(&This
->IDirect3DRM3_iface
, power
, (LPDIRECT3DRMMATERIAL2
*)material
);
607 static HRESULT WINAPI
IDirect3DRM2Impl_CreateDevice(IDirect3DRM2
*iface
,
608 DWORD width
, DWORD height
, IDirect3DRMDevice2
**device
)
610 FIXME("iface %p, width %u, height %u, device %p.\n", iface
, width
, height
, device
);
612 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2
, (IUnknown
**)device
);
615 static HRESULT WINAPI
IDirect3DRM2Impl_CreateDeviceFromSurface(IDirect3DRM2
*iface
, GUID
*pGUID
,
616 IDirectDraw
*pDD
, IDirectDrawSurface
*pDDSBack
, IDirect3DRMDevice2
**ppDevice
)
618 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
620 FIXME("(%p/%p)->(%s,%p,%p,%p): partial stub\n", iface
, This
, debugstr_guid(pGUID
),
621 pDD
, pDDSBack
, ppDevice
);
623 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2
, (IUnknown
**)ppDevice
);
626 static HRESULT WINAPI
IDirect3DRM2Impl_CreateDeviceFromD3D(IDirect3DRM2
*iface
,
627 IDirect3D2
*pD3D
, IDirect3DDevice2
*pD3DDev
, IDirect3DRMDevice2
**ppDevice
)
629 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
631 FIXME("(%p/%p)->(%p,%p,%p): partial stub\n", iface
, This
, pD3D
, pD3DDev
, ppDevice
);
633 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2
, (IUnknown
**)ppDevice
);
636 static HRESULT WINAPI
IDirect3DRM2Impl_CreateDeviceFromClipper(IDirect3DRM2
*iface
,
637 IDirectDrawClipper
*pDDClipper
, GUID
*pGUID
, int width
, int height
,
638 IDirect3DRMDevice2
**ppDevice
)
640 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
642 FIXME("(%p/%p)->(%p,%s,%d,%d,%p): partial stub\n", iface
, This
, pDDClipper
,
643 debugstr_guid(pGUID
), width
, height
, ppDevice
);
645 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2
, (IUnknown
**)ppDevice
);
648 static HRESULT WINAPI
IDirect3DRM2Impl_CreateTextureFromSurface(IDirect3DRM2
*iface
,
649 IDirectDrawSurface
*pDDS
, IDirect3DRMTexture2
**ppTexture
)
651 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
653 FIXME("(%p/%p)->(%p,%p): stub\n", iface
, This
, pDDS
, ppTexture
);
658 static HRESULT WINAPI
IDirect3DRM2Impl_CreateShadow(IDirect3DRM2
*iface
, IDirect3DRMVisual
*visual
,
659 IDirect3DRMLight
*light
, D3DVALUE px
, D3DVALUE py
, D3DVALUE pz
, D3DVALUE nx
, D3DVALUE ny
, D3DVALUE nz
,
660 IDirect3DRMVisual
**shadow
)
662 FIXME("iface %p, visual %p, light %p, px %.8e, py %.8e, pz %.8e, nx %.8e, ny %.8e, nz %.8e, shadow %p stub!\n",
663 iface
, visual
, light
, px
, py
, pz
, nx
, ny
, nz
, shadow
);
668 static HRESULT WINAPI
IDirect3DRM2Impl_CreateViewport(IDirect3DRM2
*iface
, IDirect3DRMDevice
*device
,
669 IDirect3DRMFrame
*camera
, DWORD x
, DWORD y
, DWORD width
, DWORD height
, IDirect3DRMViewport
**viewport
)
671 FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u, viewport %p partial stub!\n",
672 iface
, device
, camera
, x
, y
, width
, height
, viewport
);
674 return Direct3DRMViewport_create(&IID_IDirect3DRMViewport
, (IUnknown
**)viewport
);
677 static HRESULT WINAPI
IDirect3DRM2Impl_CreateWrap(IDirect3DRM2
*iface
, D3DRMWRAPTYPE type
, IDirect3DRMFrame
*frame
,
678 D3DVALUE ox
, D3DVALUE oy
, D3DVALUE oz
, D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
,
679 D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
, D3DVALUE ou
, D3DVALUE ov
, D3DVALUE su
, D3DVALUE sv
,
680 IDirect3DRMWrap
**wrap
)
682 FIXME("iface %p, type %#x, frame %p, ox %.8e, oy %.8e, oz %.8e, dx %.8e, dy %.8e, dz %.8e, "
683 "ux %.8e, uy %.8e, uz %.8e, ou %.8e, ov %.8e, su %.8e, sv %.8e, wrap %p stub!\n",
684 iface
, type
, frame
, ox
, oy
, oz
, dx
, dy
, dz
, ux
, uy
, uz
, ou
, ov
, su
, sv
, wrap
);
689 static HRESULT WINAPI
IDirect3DRM2Impl_CreateUserVisual(IDirect3DRM2
* iface
,
690 D3DRMUSERVISUALCALLBACK cb
, LPVOID pArg
,
691 LPDIRECT3DRMUSERVISUAL
* ppUserVisual
)
693 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
695 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface
, This
, cb
, pArg
, ppUserVisual
);
700 static HRESULT WINAPI
IDirect3DRM2Impl_LoadTexture(IDirect3DRM2
* iface
, const char* filename
,
701 LPDIRECT3DRMTEXTURE2
* Texture
)
703 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
705 FIXME("(%p/%p)->(%s,%p): stub\n", iface
, This
, filename
, Texture
);
707 return Direct3DRMTexture_create(&IID_IDirect3DRMTexture2
, (IUnknown
**)Texture
);
710 static HRESULT WINAPI
IDirect3DRM2Impl_LoadTextureFromResource(IDirect3DRM2
* iface
, HMODULE hModule
,
711 LPCSTR strName
, LPCSTR strType
,
712 LPDIRECT3DRMTEXTURE2
* Texture
)
714 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
716 FIXME("(%p/%p)->(%p,%p,%p,%p): stub\n", iface
, This
, hModule
, strName
, strType
, Texture
);
718 return Direct3DRMTexture_create(&IID_IDirect3DRMTexture2
, (IUnknown
**)Texture
);
721 static HRESULT WINAPI
IDirect3DRM2Impl_SetSearchPath(IDirect3DRM2
* iface
, LPCSTR path
)
723 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
725 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, path
);
730 static HRESULT WINAPI
IDirect3DRM2Impl_AddSearchPath(IDirect3DRM2
* iface
, LPCSTR path
)
732 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
734 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, path
);
739 static HRESULT WINAPI
IDirect3DRM2Impl_GetSearchPath(IDirect3DRM2
* iface
, DWORD
*size_return
,
742 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
744 FIXME("(%p/%p)->(%p,%s): stub\n", iface
, This
, size_return
, path_return
);
749 static HRESULT WINAPI
IDirect3DRM2Impl_SetDefaultTextureColors(IDirect3DRM2
* iface
, DWORD nb_colors
)
751 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
753 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, nb_colors
);
758 static HRESULT WINAPI
IDirect3DRM2Impl_SetDefaultTextureShades(IDirect3DRM2
* iface
, DWORD nb_shades
)
760 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
762 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, nb_shades
);
767 static HRESULT WINAPI
IDirect3DRM2Impl_GetDevices(IDirect3DRM2
* iface
,
768 LPDIRECT3DRMDEVICEARRAY
* ppDeviceArray
)
770 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
772 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, ppDeviceArray
);
777 static HRESULT WINAPI
IDirect3DRM2Impl_GetNamedObject(IDirect3DRM2
*iface
,
778 const char *name
, IDirect3DRMObject
**object
)
780 FIXME("iface %p, name %s, object %p stub!\n", iface
, debugstr_a(name
), object
);
785 static HRESULT WINAPI
IDirect3DRM2Impl_EnumerateObjects(IDirect3DRM2
* iface
, D3DRMOBJECTCALLBACK cb
,
788 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
790 FIXME("(%p/%p)->(%p,%p): stub\n", iface
, This
, cb
, pArg
);
795 static HRESULT WINAPI
IDirect3DRM2Impl_Load(IDirect3DRM2
*iface
, void *source
, void *object_id
, IID
**iids
,
796 DWORD iid_count
, D3DRMLOADOPTIONS flags
, D3DRMLOADCALLBACK load_cb
, void *load_ctx
,
797 D3DRMLOADTEXTURECALLBACK load_tex_cb
, void *load_tex_ctx
, IDirect3DRMFrame
*parent_frame
)
799 IDirect3DRMImpl
*d3drm
= impl_from_IDirect3DRM2(iface
);
800 IDirect3DRMFrame3
*parent_frame3
= NULL
;
801 HRESULT hr
= D3DRM_OK
;
803 TRACE("iface %p, source %p, object_id %p, iids %p, iid_count %u, flags %#x, "
804 "load_cb %p, load_ctx %p, load_tex_cb %p, load_tex_ctx %p, parent_frame %p.\n",
805 iface
, source
, object_id
, iids
, iid_count
, flags
,
806 load_cb
, load_ctx
, load_tex_cb
, load_tex_ctx
, parent_frame
);
809 hr
= IDirect3DRMFrame_QueryInterface(parent_frame
, &IID_IDirect3DRMFrame3
, (void **)&parent_frame3
);
811 hr
= IDirect3DRM3_Load(&d3drm
->IDirect3DRM3_iface
, source
, object_id
, iids
, iid_count
,
812 flags
, load_cb
, load_ctx
, load_tex_cb
, load_tex_ctx
, parent_frame3
);
814 IDirect3DRMFrame3_Release(parent_frame3
);
819 static HRESULT WINAPI
IDirect3DRM2Impl_Tick(IDirect3DRM2
* iface
, D3DVALUE tick
)
821 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
823 FIXME("(%p/%p)->(%f): stub\n", iface
, This
, tick
);
828 static HRESULT WINAPI
IDirect3DRM2Impl_CreateProgressiveMesh(IDirect3DRM2
* iface
,
829 LPDIRECT3DRMPROGRESSIVEMESH
* ppMesh
)
831 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM2(iface
);
833 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, ppMesh
);
838 static const struct IDirect3DRM2Vtbl Direct3DRM2_Vtbl
=
840 IDirect3DRM2Impl_QueryInterface
,
841 IDirect3DRM2Impl_AddRef
,
842 IDirect3DRM2Impl_Release
,
843 IDirect3DRM2Impl_CreateObject
,
844 IDirect3DRM2Impl_CreateFrame
,
845 IDirect3DRM2Impl_CreateMesh
,
846 IDirect3DRM2Impl_CreateMeshBuilder
,
847 IDirect3DRM2Impl_CreateFace
,
848 IDirect3DRM2Impl_CreateAnimation
,
849 IDirect3DRM2Impl_CreateAnimationSet
,
850 IDirect3DRM2Impl_CreateTexture
,
851 IDirect3DRM2Impl_CreateLight
,
852 IDirect3DRM2Impl_CreateLightRGB
,
853 IDirect3DRM2Impl_CreateMaterial
,
854 IDirect3DRM2Impl_CreateDevice
,
855 IDirect3DRM2Impl_CreateDeviceFromSurface
,
856 IDirect3DRM2Impl_CreateDeviceFromD3D
,
857 IDirect3DRM2Impl_CreateDeviceFromClipper
,
858 IDirect3DRM2Impl_CreateTextureFromSurface
,
859 IDirect3DRM2Impl_CreateShadow
,
860 IDirect3DRM2Impl_CreateViewport
,
861 IDirect3DRM2Impl_CreateWrap
,
862 IDirect3DRM2Impl_CreateUserVisual
,
863 IDirect3DRM2Impl_LoadTexture
,
864 IDirect3DRM2Impl_LoadTextureFromResource
,
865 IDirect3DRM2Impl_SetSearchPath
,
866 IDirect3DRM2Impl_AddSearchPath
,
867 IDirect3DRM2Impl_GetSearchPath
,
868 IDirect3DRM2Impl_SetDefaultTextureColors
,
869 IDirect3DRM2Impl_SetDefaultTextureShades
,
870 IDirect3DRM2Impl_GetDevices
,
871 IDirect3DRM2Impl_GetNamedObject
,
872 IDirect3DRM2Impl_EnumerateObjects
,
873 IDirect3DRM2Impl_Load
,
874 IDirect3DRM2Impl_Tick
,
875 IDirect3DRM2Impl_CreateProgressiveMesh
879 /*** IUnknown methods ***/
880 static HRESULT WINAPI
IDirect3DRM3Impl_QueryInterface(IDirect3DRM3
* iface
, REFIID riid
,
883 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
884 return IDirect3DRM_QueryInterface(&This
->IDirect3DRM_iface
, riid
, ppvObject
);
887 static ULONG WINAPI
IDirect3DRM3Impl_AddRef(IDirect3DRM3
* iface
)
889 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
890 return IDirect3DRM_AddRef(&This
->IDirect3DRM_iface
);
893 static ULONG WINAPI
IDirect3DRM3Impl_Release(IDirect3DRM3
* iface
)
895 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
896 return IDirect3DRM_Release(&This
->IDirect3DRM_iface
);
899 /*** IDirect3DRM3 methods ***/
900 static HRESULT WINAPI
IDirect3DRM3Impl_CreateObject(IDirect3DRM3
* iface
, REFCLSID rclsid
,
901 LPUNKNOWN unkwn
, REFIID riid
, LPVOID
* object
)
903 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
905 FIXME("(%p/%p)->(%s,%p,%s,%p): stub\n", iface
, This
, debugstr_guid(rclsid
), unkwn
,
906 debugstr_guid(riid
), object
);
911 static HRESULT WINAPI
IDirect3DRM3Impl_CreateFrame(IDirect3DRM3
*iface
,
912 IDirect3DRMFrame3
*parent
, IDirect3DRMFrame3
**frame
)
914 TRACE("iface %p, parent %p, frame %p.\n", iface
, parent
, frame
);
916 return Direct3DRMFrame_create(&IID_IDirect3DRMFrame3
, (IUnknown
*)parent
, (IUnknown
**)frame
);
919 static HRESULT WINAPI
IDirect3DRM3Impl_CreateMesh(IDirect3DRM3
*iface
, IDirect3DRMMesh
**mesh
)
921 TRACE("iface %p, mesh %p.\n", iface
, mesh
);
923 return Direct3DRMMesh_create(mesh
);
926 static HRESULT WINAPI
IDirect3DRM3Impl_CreateMeshBuilder(IDirect3DRM3
*iface
, IDirect3DRMMeshBuilder3
**mesh_builder
)
928 TRACE("iface %p, mesh_builder %p.\n", iface
, mesh_builder
);
930 return Direct3DRMMeshBuilder_create(&IID_IDirect3DRMMeshBuilder3
, (IUnknown
**)mesh_builder
);
933 static HRESULT WINAPI
IDirect3DRM3Impl_CreateFace(IDirect3DRM3
*iface
, IDirect3DRMFace2
**face
)
935 TRACE("iface %p, face %p.\n", iface
, face
);
937 return Direct3DRMFace_create(&IID_IDirect3DRMFace2
, (IUnknown
**)face
);
940 static HRESULT WINAPI
IDirect3DRM3Impl_CreateAnimation(IDirect3DRM3
* iface
,
941 LPDIRECT3DRMANIMATION2
* Animation
)
943 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
945 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, Animation
);
950 static HRESULT WINAPI
IDirect3DRM3Impl_CreateAnimationSet(IDirect3DRM3
* iface
,
951 LPDIRECT3DRMANIMATIONSET2
* AnimationSet
)
953 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
955 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, AnimationSet
);
960 static HRESULT WINAPI
IDirect3DRM3Impl_CreateTexture(IDirect3DRM3
*iface
,
961 D3DRMIMAGE
*image
, IDirect3DRMTexture3
**texture
)
963 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
965 FIXME("(%p/%p)->(%p,%p): partial stub\n", iface
, This
, image
, texture
);
967 return Direct3DRMTexture_create(&IID_IDirect3DRMTexture3
, (IUnknown
**)texture
);
970 static HRESULT WINAPI
IDirect3DRM3Impl_CreateLight(IDirect3DRM3
*iface
,
971 D3DRMLIGHTTYPE type
, D3DCOLOR color
, IDirect3DRMLight
**light
)
975 FIXME("iface %p, type %#x, color 0x%08x, light %p partial stub!\n", iface
, type
, color
, light
);
977 if (SUCCEEDED(hr
= Direct3DRMLight_create((IUnknown
**)light
)))
979 IDirect3DRMLight_SetType(*light
, type
);
980 IDirect3DRMLight_SetColor(*light
, color
);
986 static HRESULT WINAPI
IDirect3DRM3Impl_CreateLightRGB(IDirect3DRM3
*iface
, D3DRMLIGHTTYPE type
,
987 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
, IDirect3DRMLight
**light
)
991 FIXME("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p partial stub!\n",
992 iface
, type
, red
, green
, blue
, light
);
994 if (SUCCEEDED(hr
= Direct3DRMLight_create((IUnknown
**)light
)))
996 IDirect3DRMLight_SetType(*light
, type
);
997 IDirect3DRMLight_SetColorRGB(*light
, red
, green
, blue
);
1003 static HRESULT WINAPI
IDirect3DRM3Impl_CreateMaterial(IDirect3DRM3
* iface
, D3DVALUE power
,
1004 LPDIRECT3DRMMATERIAL2
* material
)
1006 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1009 TRACE("(%p/%p)->(%f,%p)\n", iface
, This
, power
, material
);
1011 ret
= Direct3DRMMaterial_create(material
);
1014 IDirect3DRMMaterial2_SetPower(*material
, power
);
1019 static HRESULT WINAPI
IDirect3DRM3Impl_CreateDevice(IDirect3DRM3
*iface
,
1020 DWORD width
, DWORD height
, IDirect3DRMDevice3
**device
)
1022 FIXME("iface %p, width %u, height %u, device %p partial stub!\n", iface
, width
, height
, device
);
1024 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3
, (IUnknown
**)device
);
1027 static HRESULT WINAPI
IDirect3DRM3Impl_CreateDeviceFromSurface(IDirect3DRM3
*iface
, GUID
*pGUID
,
1028 IDirectDraw
*dd
, IDirectDrawSurface
*back
, IDirect3DRMDevice3
**device
)
1030 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1032 FIXME("(%p/%p)->(%s,%p,%p,%p): partial stub\n", iface
, This
, debugstr_guid(pGUID
), dd
, back
, device
);
1034 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3
, (IUnknown
**)device
);
1037 static HRESULT WINAPI
IDirect3DRM3Impl_CreateDeviceFromD3D(IDirect3DRM3
*iface
,
1038 IDirect3D2
*d3d
, IDirect3DDevice2
*d3ddev
, IDirect3DRMDevice3
**device
)
1040 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1042 FIXME("(%p/%p)->(%p,%p,%p): partial stub\n", iface
, This
, d3d
, d3ddev
, device
);
1044 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3
, (IUnknown
**)device
);
1047 static HRESULT WINAPI
IDirect3DRM3Impl_CreateDeviceFromClipper(IDirect3DRM3
*iface
,
1048 IDirectDrawClipper
*clipper
, GUID
*guid
, int width
, int height
,
1049 IDirect3DRMDevice3
**device
)
1051 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1053 FIXME("(%p/%p)->(%p,%s,%d,%d,%p): partial stub\n", iface
, This
, clipper
, debugstr_guid(guid
),
1054 width
, height
, device
);
1056 return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3
, (IUnknown
**)device
);
1059 static HRESULT WINAPI
IDirect3DRM3Impl_CreateShadow(IDirect3DRM3
*iface
, IUnknown
*object
, IDirect3DRMLight
*light
,
1060 D3DVALUE px
, D3DVALUE py
, D3DVALUE pz
, D3DVALUE nx
, D3DVALUE ny
, D3DVALUE nz
, IDirect3DRMShadow2
**shadow
)
1062 FIXME("iface %p, object %p, light %p, px %.8e, py %.8e, pz %.8e, nx %.8e, ny %.8e, nz %.8e, shadow %p stub!\n",
1063 iface
, object
, light
, px
, py
, pz
, nx
, ny
, nz
, shadow
);
1068 static HRESULT WINAPI
IDirect3DRM3Impl_CreateTextureFromSurface(IDirect3DRM3
*iface
,
1069 IDirectDrawSurface
*surface
, IDirect3DRMTexture3
**texture
)
1071 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1073 FIXME("(%p/%p)->(%p,%p): stub\n", iface
, This
, surface
, texture
);
1078 static HRESULT WINAPI
IDirect3DRM3Impl_CreateViewport(IDirect3DRM3
*iface
, IDirect3DRMDevice3
*device
,
1079 IDirect3DRMFrame3
*camera
, DWORD x
, DWORD y
, DWORD width
, DWORD height
, IDirect3DRMViewport2
**viewport
)
1081 FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u, viewport %p partial stub!\n",
1082 iface
, device
, camera
, x
, y
, width
, height
, viewport
);
1084 return Direct3DRMViewport_create(&IID_IDirect3DRMViewport2
, (IUnknown
**)viewport
);
1087 static HRESULT WINAPI
IDirect3DRM3Impl_CreateWrap(IDirect3DRM3
*iface
, D3DRMWRAPTYPE type
, IDirect3DRMFrame3
*frame
,
1088 D3DVALUE ox
, D3DVALUE oy
, D3DVALUE oz
, D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
,
1089 D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
, D3DVALUE ou
, D3DVALUE ov
, D3DVALUE su
, D3DVALUE sv
,
1090 IDirect3DRMWrap
**wrap
)
1092 FIXME("iface %p, type %#x, frame %p, ox %.8e, oy %.8e, oz %.8e, dx %.8e, dy %.8e, dz %.8e, "
1093 "ux %.8e, uy %.8e, uz %.8e, ou %.8e, ov %.8e, su %.8e, sv %.8e, wrap %p stub!\n",
1094 iface
, type
, frame
, ox
, oy
, oz
, dx
, dy
, dz
, ux
, uy
, uz
, ou
, ov
, su
, sv
, wrap
);
1099 static HRESULT WINAPI
IDirect3DRM3Impl_CreateUserVisual(IDirect3DRM3
* iface
,
1100 D3DRMUSERVISUALCALLBACK cb
, LPVOID arg
,
1101 LPDIRECT3DRMUSERVISUAL
* UserVisual
)
1103 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1105 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface
, This
, cb
, arg
, UserVisual
);
1110 static HRESULT WINAPI
IDirect3DRM3Impl_LoadTexture(IDirect3DRM3
* iface
, const char* filename
,
1111 LPDIRECT3DRMTEXTURE3
* Texture
)
1113 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1115 FIXME("(%p/%p)->(%s,%p): stub\n", iface
, This
, filename
, Texture
);
1117 return Direct3DRMTexture_create(&IID_IDirect3DRMTexture3
, (IUnknown
**)Texture
);
1120 static HRESULT WINAPI
IDirect3DRM3Impl_LoadTextureFromResource(IDirect3DRM3
* iface
, HMODULE mod
,
1121 LPCSTR strName
, LPCSTR strType
,
1122 LPDIRECT3DRMTEXTURE3
* Texture
)
1124 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1126 FIXME("(%p/%p)->(%p,%p,%p,%p): stub\n", iface
, This
, mod
, strName
, strType
, Texture
);
1128 return Direct3DRMTexture_create(&IID_IDirect3DRMTexture3
, (IUnknown
**)Texture
);
1131 static HRESULT WINAPI
IDirect3DRM3Impl_SetSearchPath(IDirect3DRM3
* iface
, LPCSTR path
)
1133 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1135 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, path
);
1140 static HRESULT WINAPI
IDirect3DRM3Impl_AddSearchPath(IDirect3DRM3
* iface
, LPCSTR path
)
1142 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1144 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, path
);
1149 static HRESULT WINAPI
IDirect3DRM3Impl_GetSearchPath(IDirect3DRM3
* iface
, DWORD
* size_return
,
1152 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1154 FIXME("(%p/%p)->(%p,%s): stub\n", iface
, This
, size_return
, path_return
);
1159 static HRESULT WINAPI
IDirect3DRM3Impl_SetDefaultTextureColors(IDirect3DRM3
* iface
, DWORD nb_colors
)
1161 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1163 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, nb_colors
);
1168 static HRESULT WINAPI
IDirect3DRM3Impl_SetDefaultTextureShades(IDirect3DRM3
* iface
, DWORD nb_shades
)
1170 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1172 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, nb_shades
);
1177 static HRESULT WINAPI
IDirect3DRM3Impl_GetDevices(IDirect3DRM3
* iface
,
1178 LPDIRECT3DRMDEVICEARRAY
* DeviceArray
)
1180 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1182 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, DeviceArray
);
1187 static HRESULT WINAPI
IDirect3DRM3Impl_GetNamedObject(IDirect3DRM3
*iface
,
1188 const char *name
, IDirect3DRMObject
**object
)
1190 FIXME("iface %p, name %s, object %p stub!\n", iface
, debugstr_a(name
), object
);
1195 static HRESULT WINAPI
IDirect3DRM3Impl_EnumerateObjects(IDirect3DRM3
* iface
, D3DRMOBJECTCALLBACK cb
,
1198 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1200 FIXME("(%p/%p)->(%p,%p): stub\n", iface
, This
, cb
, arg
);
1205 static HRESULT
load_data(IDirect3DRM3
*iface
, IDirectXFileData
*data_object
, IID
**GUIDs
, DWORD nb_GUIDs
, D3DRMLOADCALLBACK LoadProc
,
1206 void *ArgLP
, D3DRMLOADTEXTURECALLBACK LoadTextureProc
, void *ArgLTP
, IDirect3DRMFrame3
*parent_frame
)
1208 HRESULT ret
= D3DRMERR_BADOBJECT
;
1212 BOOL requested
= FALSE
;
1214 hr
= IDirectXFileData_GetType(data_object
, &guid
);
1215 if (hr
!= DXFILE_OK
)
1218 TRACE("Found object type whose GUID = %s\n", debugstr_guid(guid
));
1220 /* Load object only if it is top level and requested or if it is part of another object */
1222 if (IsEqualGUID(guid
, &TID_D3DRMMesh
))
1224 TRACE("Found TID_D3DRMMesh\n");
1226 for (i
= 0; i
< nb_GUIDs
; i
++)
1227 if (IsEqualGUID(GUIDs
[i
], &IID_IDirect3DRMMeshBuilder
) ||
1228 IsEqualGUID(GUIDs
[i
], &IID_IDirect3DRMMeshBuilder2
) ||
1229 IsEqualGUID(GUIDs
[i
], &IID_IDirect3DRMMeshBuilder3
))
1235 if (requested
|| parent_frame
)
1237 IDirect3DRMMeshBuilder3
*meshbuilder
;
1239 TRACE("Load mesh data\n");
1241 hr
= IDirect3DRM3_CreateMeshBuilder(iface
, &meshbuilder
);
1244 hr
= load_mesh_data(meshbuilder
, data_object
, LoadTextureProc
, ArgLTP
);
1247 /* Only top level objects are notified */
1250 IDirect3DRMObject
*object
;
1252 hr
= IDirect3DRMMeshBuilder3_QueryInterface(meshbuilder
, GUIDs
[i
], (void**)&object
);
1255 LoadProc(object
, GUIDs
[i
], ArgLP
);
1256 IDirect3DRMObject_Release(object
);
1261 IDirect3DRMFrame3_AddVisual(parent_frame
, (IUnknown
*)meshbuilder
);
1264 IDirect3DRMMeshBuilder3_Release(meshbuilder
);
1268 ERR("Cannot process mesh\n");
1271 else if (IsEqualGUID(guid
, &TID_D3DRMFrame
))
1273 TRACE("Found TID_D3DRMFrame\n");
1275 for (i
= 0; i
< nb_GUIDs
; i
++)
1276 if (IsEqualGUID(GUIDs
[i
], &IID_IDirect3DRMFrame
) ||
1277 IsEqualGUID(GUIDs
[i
], &IID_IDirect3DRMFrame2
) ||
1278 IsEqualGUID(GUIDs
[i
], &IID_IDirect3DRMFrame3
))
1284 if (requested
|| parent_frame
)
1286 IDirect3DRMFrame3
*frame
;
1288 TRACE("Load frame data\n");
1290 hr
= IDirect3DRM3_CreateFrame(iface
, parent_frame
, &frame
);
1293 IDirectXFileObject
*child
;
1295 while (SUCCEEDED(hr
= IDirectXFileData_GetNextObject(data_object
, &child
)))
1297 IDirectXFileData
*data
;
1298 IDirectXFileDataReference
*reference
;
1299 IDirectXFileBinary
*binary
;
1301 hr
= IDirectXFileObject_QueryInterface(child
, &IID_IDirectXFileBinary
, (void **)&binary
);
1304 FIXME("Binary Object not supported yet\n");
1305 IDirectXFileBinary_Release(binary
);
1309 hr
= IDirectXFileObject_QueryInterface(child
, &IID_IDirectXFileData
, (void **)&data
);
1312 TRACE("Found Data Object\n");
1313 hr
= load_data(iface
, data
, GUIDs
, nb_GUIDs
, LoadProc
, ArgLP
, LoadTextureProc
, ArgLTP
, frame
);
1314 IDirectXFileData_Release(data
);
1317 hr
= IDirectXFileObject_QueryInterface(child
, &IID_IDirectXFileDataReference
, (void **)&reference
);
1320 TRACE("Found Data Object Reference\n");
1321 IDirectXFileDataReference_Resolve(reference
, &data
);
1322 hr
= load_data(iface
, data
, GUIDs
, nb_GUIDs
, LoadProc
, ArgLP
, LoadTextureProc
, ArgLTP
, frame
);
1323 IDirectXFileData_Release(data
);
1324 IDirectXFileDataReference_Release(reference
);
1329 if (hr
!= DXFILEERR_NOMOREOBJECTS
)
1331 IDirect3DRMFrame3_Release(frame
);
1336 /* Only top level objects are notified */
1339 IDirect3DRMObject
*object
;
1341 hr
= IDirect3DRMFrame3_QueryInterface(frame
, GUIDs
[i
], (void**)&object
);
1344 LoadProc(object
, GUIDs
[i
], ArgLP
);
1345 IDirect3DRMObject_Release(object
);
1348 IDirect3DRMFrame3_Release(frame
);
1352 ERR("Cannot process frame\n");
1355 else if (IsEqualGUID(guid
, &TID_D3DRMMaterial
))
1357 TRACE("Found TID_D3DRMMaterial\n");
1359 /* Cannot be requested so nothing to do */
1361 else if (IsEqualGUID(guid
, &TID_D3DRMFrameTransformMatrix
))
1363 TRACE("Found TID_D3DRMFrameTransformMatrix\n");
1365 /* Cannot be requested */
1368 D3DRMMATRIX4D matrix
;
1371 TRACE("Load Frame Transform Matrix data\n");
1373 size
= sizeof(matrix
);
1374 hr
= IDirectXFileData_GetData(data_object
, NULL
, &size
, (void**)matrix
);
1375 if ((hr
!= DXFILE_OK
) || (size
!= sizeof(matrix
)))
1378 hr
= IDirect3DRMFrame3_AddTransform(parent_frame
, D3DRMCOMBINE_REPLACE
, matrix
);
1385 FIXME("Found unknown TID %s\n", debugstr_guid(guid
));
1395 static HRESULT WINAPI
IDirect3DRM3Impl_Load(IDirect3DRM3
*iface
, void *source
, void *object_id
, IID
**iids
,
1396 DWORD iid_count
, D3DRMLOADOPTIONS flags
, D3DRMLOADCALLBACK load_cb
, void *load_ctx
,
1397 D3DRMLOADTEXTURECALLBACK load_tex_cb
, void *load_tex_ctx
, IDirect3DRMFrame3
*parent_frame
)
1399 DXFILELOADOPTIONS load_options
;
1400 LPDIRECTXFILE pDXFile
= NULL
;
1401 LPDIRECTXFILEENUMOBJECT pEnumObject
= NULL
;
1402 LPDIRECTXFILEDATA pData
= NULL
;
1407 HRESULT ret
= D3DRMERR_BADOBJECT
;
1410 TRACE("iface %p, source %p, object_id %p, iids %p, iid_count %u, flags %#x, "
1411 "load_cb %p, load_ctx %p, load_tex_cb %p, load_tex_ctx %p, parent_frame %p.\n",
1412 iface
, source
, object_id
, iids
, iid_count
, flags
,
1413 load_cb
, load_ctx
, load_tex_cb
, load_tex_ctx
, parent_frame
);
1415 TRACE("Looking for GUIDs:\n");
1416 for (i
= 0; i
< iid_count
; ++i
)
1417 TRACE("- %s (%s)\n", debugstr_guid(iids
[i
]), get_IID_string(iids
[i
]));
1419 if (flags
== D3DRMLOAD_FROMMEMORY
)
1421 load_options
= DXFILELOAD_FROMMEMORY
;
1423 else if (flags
== D3DRMLOAD_FROMFILE
)
1425 load_options
= DXFILELOAD_FROMFILE
;
1426 TRACE("Loading from file %s\n", debugstr_a(source
));
1430 FIXME("Load options %#x not supported yet.\n", flags
);
1434 hr
= DirectXFileCreate(&pDXFile
);
1435 if (hr
!= DXFILE_OK
)
1438 hr
= IDirectXFile_RegisterTemplates(pDXFile
, templates
, strlen(templates
));
1439 if (hr
!= DXFILE_OK
)
1442 hr
= IDirectXFile_CreateEnumObject(pDXFile
, source
, load_options
, &pEnumObject
);
1443 if (hr
!= DXFILE_OK
)
1446 hr
= IDirectXFileEnumObject_GetNextDataObject(pEnumObject
, &pData
);
1447 if (hr
!= DXFILE_OK
)
1450 hr
= IDirectXFileData_GetType(pData
, &pGuid
);
1451 if (hr
!= DXFILE_OK
)
1454 TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid
));
1456 if (!IsEqualGUID(pGuid
, &TID_DXFILEHeader
))
1458 ret
= D3DRMERR_BADFILE
;
1462 hr
= IDirectXFileData_GetData(pData
, NULL
, &size
, (void**)&pHeader
);
1463 if ((hr
!= DXFILE_OK
) || (size
!= sizeof(Header
)))
1466 TRACE("Version is %d %d %d\n", pHeader
->major
, pHeader
->minor
, pHeader
->flags
);
1468 /* Version must be 1.0.x */
1469 if ((pHeader
->major
!= 1) || (pHeader
->minor
!= 0))
1471 ret
= D3DRMERR_BADFILE
;
1475 IDirectXFileData_Release(pData
);
1480 hr
= IDirectXFileEnumObject_GetNextDataObject(pEnumObject
, &pData
);
1481 if (hr
== DXFILEERR_NOMOREOBJECTS
)
1483 TRACE("No more object\n");
1486 else if (hr
!= DXFILE_OK
)
1488 ret
= D3DRMERR_BADFILE
;
1492 ret
= load_data(iface
, pData
, iids
, iid_count
, load_cb
, load_ctx
, load_tex_cb
, load_tex_ctx
, parent_frame
);
1493 if (ret
!= D3DRM_OK
)
1496 IDirectXFileData_Release(pData
);
1504 IDirectXFileData_Release(pData
);
1506 IDirectXFileEnumObject_Release(pEnumObject
);
1508 IDirectXFile_Release(pDXFile
);
1513 static HRESULT WINAPI
IDirect3DRM3Impl_Tick(IDirect3DRM3
* iface
, D3DVALUE tick
)
1515 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1517 FIXME("(%p/%p)->(%f): stub\n", iface
, This
, tick
);
1522 static HRESULT WINAPI
IDirect3DRM3Impl_CreateProgressiveMesh(IDirect3DRM3
* iface
,
1523 LPDIRECT3DRMPROGRESSIVEMESH Mesh
)
1525 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1527 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, Mesh
);
1532 static HRESULT WINAPI
IDirect3DRM3Impl_RegisterClient(IDirect3DRM3
* iface
, REFGUID rguid
,
1535 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1537 FIXME("(%p/%p)->(%s, %p): stub\n", iface
, This
, debugstr_guid(rguid
), id
);
1542 static HRESULT WINAPI
IDirect3DRM3Impl_UnregisterClient(IDirect3DRM3
* iface
, REFGUID rguid
)
1544 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1546 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, debugstr_guid(rguid
));
1551 static HRESULT WINAPI
IDirect3DRM3Impl_CreateClippedVisual(IDirect3DRM3
*iface
,
1552 IDirect3DRMVisual
*visual
, IDirect3DRMClippedVisual
**clipped_visual
)
1554 FIXME("iface %p, visual %p, clipped_visual %p stub!\n", iface
, visual
, clipped_visual
);
1559 static HRESULT WINAPI
IDirect3DRM3Impl_SetOptions(IDirect3DRM3
* iface
, DWORD opt
)
1561 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1563 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, opt
);
1568 static HRESULT WINAPI
IDirect3DRM3Impl_GetOptions(IDirect3DRM3
* iface
, LPDWORD opt
)
1570 IDirect3DRMImpl
*This
= impl_from_IDirect3DRM3(iface
);
1572 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, opt
);
1577 static const struct IDirect3DRM3Vtbl Direct3DRM3_Vtbl
=
1579 IDirect3DRM3Impl_QueryInterface
,
1580 IDirect3DRM3Impl_AddRef
,
1581 IDirect3DRM3Impl_Release
,
1582 IDirect3DRM3Impl_CreateObject
,
1583 IDirect3DRM3Impl_CreateFrame
,
1584 IDirect3DRM3Impl_CreateMesh
,
1585 IDirect3DRM3Impl_CreateMeshBuilder
,
1586 IDirect3DRM3Impl_CreateFace
,
1587 IDirect3DRM3Impl_CreateAnimation
,
1588 IDirect3DRM3Impl_CreateAnimationSet
,
1589 IDirect3DRM3Impl_CreateTexture
,
1590 IDirect3DRM3Impl_CreateLight
,
1591 IDirect3DRM3Impl_CreateLightRGB
,
1592 IDirect3DRM3Impl_CreateMaterial
,
1593 IDirect3DRM3Impl_CreateDevice
,
1594 IDirect3DRM3Impl_CreateDeviceFromSurface
,
1595 IDirect3DRM3Impl_CreateDeviceFromD3D
,
1596 IDirect3DRM3Impl_CreateDeviceFromClipper
,
1597 IDirect3DRM3Impl_CreateTextureFromSurface
,
1598 IDirect3DRM3Impl_CreateShadow
,
1599 IDirect3DRM3Impl_CreateViewport
,
1600 IDirect3DRM3Impl_CreateWrap
,
1601 IDirect3DRM3Impl_CreateUserVisual
,
1602 IDirect3DRM3Impl_LoadTexture
,
1603 IDirect3DRM3Impl_LoadTextureFromResource
,
1604 IDirect3DRM3Impl_SetSearchPath
,
1605 IDirect3DRM3Impl_AddSearchPath
,
1606 IDirect3DRM3Impl_GetSearchPath
,
1607 IDirect3DRM3Impl_SetDefaultTextureColors
,
1608 IDirect3DRM3Impl_SetDefaultTextureShades
,
1609 IDirect3DRM3Impl_GetDevices
,
1610 IDirect3DRM3Impl_GetNamedObject
,
1611 IDirect3DRM3Impl_EnumerateObjects
,
1612 IDirect3DRM3Impl_Load
,
1613 IDirect3DRM3Impl_Tick
,
1614 IDirect3DRM3Impl_CreateProgressiveMesh
,
1615 IDirect3DRM3Impl_RegisterClient
,
1616 IDirect3DRM3Impl_UnregisterClient
,
1617 IDirect3DRM3Impl_CreateClippedVisual
,
1618 IDirect3DRM3Impl_SetOptions
,
1619 IDirect3DRM3Impl_GetOptions
1622 HRESULT WINAPI
Direct3DRMCreate(IDirect3DRM
**d3drm
)
1624 IDirect3DRMImpl
*object
;
1626 TRACE("d3drm %p.\n", d3drm
);
1628 if (!(object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*object
))))
1629 return E_OUTOFMEMORY
;
1631 object
->IDirect3DRM_iface
.lpVtbl
= &Direct3DRM_Vtbl
;
1632 object
->IDirect3DRM2_iface
.lpVtbl
= &Direct3DRM2_Vtbl
;
1633 object
->IDirect3DRM3_iface
.lpVtbl
= &Direct3DRM3_Vtbl
;
1636 *d3drm
= &object
->IDirect3DRM_iface
;