2 * Implementation of IDirect3DRMTextureX interfaces
4 * Copyright 2012 Christian Costa
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "d3drm_private.h"
25 IDirect3DRMTexture2 IDirect3DRMTexture2_iface
;
26 IDirect3DRMTexture3 IDirect3DRMTexture3_iface
;
31 static inline struct d3drm_texture
*impl_from_IDirect3DRMTexture2(IDirect3DRMTexture2
*iface
)
33 return CONTAINING_RECORD(iface
, struct d3drm_texture
, IDirect3DRMTexture2_iface
);
36 static inline struct d3drm_texture
*impl_from_IDirect3DRMTexture3(IDirect3DRMTexture3
*iface
)
38 return CONTAINING_RECORD(iface
, struct d3drm_texture
, IDirect3DRMTexture3_iface
);
41 static HRESULT WINAPI
d3drm_texture2_QueryInterface(IDirect3DRMTexture2
*iface
, REFIID riid
, void **out
)
43 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture2(iface
);
45 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
47 if (IsEqualGUID(riid
, &IID_IDirect3DRMTexture2
)
48 || IsEqualGUID(riid
, &IID_IDirect3DRMTexture
)
49 || IsEqualGUID(riid
, &IID_IUnknown
))
51 *out
= &texture
->IDirect3DRMTexture2_iface
;
53 else if (IsEqualGUID(riid
, &IID_IDirect3DRMTexture3
))
55 *out
= &texture
->IDirect3DRMTexture3_iface
;
60 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid
));
64 IUnknown_AddRef((IUnknown
*)*out
);
68 static ULONG WINAPI
d3drm_texture2_AddRef(IDirect3DRMTexture2
*iface
)
70 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture2(iface
);
71 ULONG refcount
= InterlockedIncrement(&texture
->ref
);
73 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
78 static ULONG WINAPI
d3drm_texture2_Release(IDirect3DRMTexture2
*iface
)
80 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture2(iface
);
81 ULONG refcount
= InterlockedDecrement(&texture
->ref
);
83 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
86 HeapFree(GetProcessHeap(), 0, texture
);
91 static HRESULT WINAPI
d3drm_texture2_Clone(IDirect3DRMTexture2
*iface
,
92 IUnknown
*outer
, REFIID iid
, void **out
)
94 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
99 static HRESULT WINAPI
d3drm_texture2_AddDestroyCallback(IDirect3DRMTexture2
*iface
,
100 D3DRMOBJECTCALLBACK cb
, void *ctx
)
102 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
107 static HRESULT WINAPI
d3drm_texture2_DeleteDestroyCallback(IDirect3DRMTexture2
*iface
,
108 D3DRMOBJECTCALLBACK cb
, void *ctx
)
110 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
115 static HRESULT WINAPI
d3drm_texture2_SetAppData(IDirect3DRMTexture2
*iface
, DWORD data
)
117 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture2(iface
);
119 TRACE("iface %p, data %#x.\n", iface
, data
);
121 return IDirect3DRMTexture3_SetAppData(&texture
->IDirect3DRMTexture3_iface
, data
);
124 static DWORD WINAPI
d3drm_texture2_GetAppData(IDirect3DRMTexture2
*iface
)
126 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture2(iface
);
128 TRACE("iface %p.\n", iface
);
130 return IDirect3DRMTexture3_GetAppData(&texture
->IDirect3DRMTexture3_iface
);
133 static HRESULT WINAPI
d3drm_texture2_SetName(IDirect3DRMTexture2
*iface
, const char *name
)
135 FIXME("iface %p, name %s stub!\n", iface
, debugstr_a(name
));
140 static HRESULT WINAPI
d3drm_texture2_GetName(IDirect3DRMTexture2
*iface
, DWORD
*size
, char *name
)
142 FIXME("iface %p, size %p, name %p stub!\n", iface
, size
, name
);
147 static HRESULT WINAPI
d3drm_texture2_GetClassName(IDirect3DRMTexture2
*iface
, DWORD
*size
, char *name
)
149 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture2(iface
);
151 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
153 return IDirect3DRMTexture3_GetClassName(&texture
->IDirect3DRMTexture3_iface
, size
, name
);
156 static HRESULT WINAPI
d3drm_texture2_InitFromFile(IDirect3DRMTexture2
*iface
, const char *filename
)
158 FIXME("iface %p, filename %s stub!\n", iface
, debugstr_a(filename
));
163 static HRESULT WINAPI
d3drm_texture2_InitFromSurface(IDirect3DRMTexture2
*iface
,
164 IDirectDrawSurface
*surface
)
166 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
171 static HRESULT WINAPI
d3drm_texture2_InitFromResource(IDirect3DRMTexture2
*iface
, HRSRC resource
)
173 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
178 static HRESULT WINAPI
d3drm_texture2_Changed(IDirect3DRMTexture2
*iface
, BOOL pixels
, BOOL palette
)
180 FIXME("iface %p, pixels %#x, palette %#x stub!\n", iface
, pixels
, palette
);
185 static HRESULT WINAPI
d3drm_texture2_SetColors(IDirect3DRMTexture2
*iface
, DWORD max_colors
)
187 FIXME("iface %p, max_colors %u stub!\n", iface
, max_colors
);
192 static HRESULT WINAPI
d3drm_texture2_SetShades(IDirect3DRMTexture2
*iface
, DWORD max_shades
)
194 FIXME("iface %p, max_shades %u stub!\n", iface
, max_shades
);
199 static HRESULT WINAPI
d3drm_texture2_SetDecalSize(IDirect3DRMTexture2
*iface
, D3DVALUE width
, D3DVALUE height
)
201 FIXME("iface %p, width %.8e, height %.8e stub!\n", iface
, width
, height
);
206 static HRESULT WINAPI
d3drm_texture2_SetDecalOrigin(IDirect3DRMTexture2
*iface
, LONG x
, LONG y
)
208 FIXME("iface %p, x %d, y %d stub!\n", iface
, x
, y
);
213 static HRESULT WINAPI
d3drm_texture2_SetDecalScale(IDirect3DRMTexture2
*iface
, DWORD scale
)
215 FIXME("iface %p, scale %u stub!\n", iface
, scale
);
220 static HRESULT WINAPI
d3drm_texture2_SetDecalTransparency(IDirect3DRMTexture2
*iface
, BOOL transparency
)
222 FIXME("iface %p, transparency %#x stub!\n", iface
, transparency
);
227 static HRESULT WINAPI
d3drm_texture2_SetDecalTransparentColor(IDirect3DRMTexture2
*iface
, D3DCOLOR color
)
229 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
234 static HRESULT WINAPI
d3drm_texture2_GetDecalSize(IDirect3DRMTexture2
*iface
, D3DVALUE
*width
, D3DVALUE
*height
)
236 FIXME("iface %p, width %p, height %p stub!\n", iface
, width
, height
);
241 static HRESULT WINAPI
d3drm_texture2_GetDecalOrigin(IDirect3DRMTexture2
*iface
, LONG
*x
, LONG
*y
)
243 FIXME("iface %p, x %p, y %p stub!\n", iface
, x
, y
);
248 static D3DRMIMAGE
* WINAPI
d3drm_texture2_GetImage(IDirect3DRMTexture2
*iface
)
250 FIXME("iface %p stub!\n", iface
);
255 static DWORD WINAPI
d3drm_texture2_GetShades(IDirect3DRMTexture2
*iface
)
257 FIXME("iface %p stub!\n", iface
);
262 static DWORD WINAPI
d3drm_texture2_GetColors(IDirect3DRMTexture2
*iface
)
264 FIXME("iface %p stub!\n", iface
);
269 static DWORD WINAPI
d3drm_texture2_GetDecalScale(IDirect3DRMTexture2
*iface
)
271 FIXME("iface %p stub!\n", iface
);
276 static BOOL WINAPI
d3drm_texture2_GetDecalTransparency(IDirect3DRMTexture2
*iface
)
278 FIXME("iface %p stub!\n", iface
);
283 static D3DCOLOR WINAPI
d3drm_texture2_GetDecalTransparentColor(IDirect3DRMTexture2
*iface
)
285 FIXME("iface %p stub!\n", iface
);
290 static HRESULT WINAPI
d3drm_texture2_InitFromImage(IDirect3DRMTexture2
*iface
, D3DRMIMAGE
*image
)
292 FIXME("iface %p, image %p stub!\n", iface
, image
);
297 static HRESULT WINAPI
d3drm_texture2_InitFromResource2(IDirect3DRMTexture2
*iface
,
298 HMODULE module
, const char *name
, const char *type
)
300 FIXME("iface %p, module %p, name %s, type %s stub!\n",
301 iface
, module
, debugstr_a(name
), debugstr_a(type
));
306 static HRESULT WINAPI
d3drm_texture2_GenerateMIPMap(IDirect3DRMTexture2
*iface
, DWORD flags
)
308 FIXME("iface %p, flags %#x stub!\n", iface
, flags
);
313 static const struct IDirect3DRMTexture2Vtbl d3drm_texture2_vtbl
=
315 d3drm_texture2_QueryInterface
,
316 d3drm_texture2_AddRef
,
317 d3drm_texture2_Release
,
318 d3drm_texture2_Clone
,
319 d3drm_texture2_AddDestroyCallback
,
320 d3drm_texture2_DeleteDestroyCallback
,
321 d3drm_texture2_SetAppData
,
322 d3drm_texture2_GetAppData
,
323 d3drm_texture2_SetName
,
324 d3drm_texture2_GetName
,
325 d3drm_texture2_GetClassName
,
326 d3drm_texture2_InitFromFile
,
327 d3drm_texture2_InitFromSurface
,
328 d3drm_texture2_InitFromResource
,
329 d3drm_texture2_Changed
,
330 d3drm_texture2_SetColors
,
331 d3drm_texture2_SetShades
,
332 d3drm_texture2_SetDecalSize
,
333 d3drm_texture2_SetDecalOrigin
,
334 d3drm_texture2_SetDecalScale
,
335 d3drm_texture2_SetDecalTransparency
,
336 d3drm_texture2_SetDecalTransparentColor
,
337 d3drm_texture2_GetDecalSize
,
338 d3drm_texture2_GetDecalOrigin
,
339 d3drm_texture2_GetImage
,
340 d3drm_texture2_GetShades
,
341 d3drm_texture2_GetColors
,
342 d3drm_texture2_GetDecalScale
,
343 d3drm_texture2_GetDecalTransparency
,
344 d3drm_texture2_GetDecalTransparentColor
,
345 d3drm_texture2_InitFromImage
,
346 d3drm_texture2_InitFromResource2
,
347 d3drm_texture2_GenerateMIPMap
,
350 static HRESULT WINAPI
d3drm_texture3_QueryInterface(IDirect3DRMTexture3
*iface
, REFIID riid
, void **out
)
352 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture3(iface
);
354 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
356 if (IsEqualGUID(riid
, &IID_IDirect3DRMTexture2
)
357 || IsEqualGUID(riid
, &IID_IDirect3DRMTexture
)
358 || IsEqualGUID(riid
, &IID_IUnknown
))
360 *out
= &texture
->IDirect3DRMTexture2_iface
;
362 else if (IsEqualGUID(riid
, &IID_IDirect3DRMTexture3
))
364 *out
= &texture
->IDirect3DRMTexture3_iface
;
369 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid
));
370 return E_NOINTERFACE
;
373 IUnknown_AddRef((IUnknown
*)*out
);
377 static ULONG WINAPI
d3drm_texture3_AddRef(IDirect3DRMTexture3
*iface
)
379 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture3(iface
);
380 ULONG refcount
= InterlockedIncrement(&texture
->ref
);
382 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
387 static ULONG WINAPI
d3drm_texture3_Release(IDirect3DRMTexture3
*iface
)
389 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture3(iface
);
390 ULONG refcount
= InterlockedDecrement(&texture
->ref
);
392 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
395 HeapFree(GetProcessHeap(), 0, texture
);
400 static HRESULT WINAPI
d3drm_texture3_Clone(IDirect3DRMTexture3
*iface
,
401 IUnknown
*outer
, REFIID iid
, void **out
)
403 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
408 static HRESULT WINAPI
d3drm_texture3_AddDestroyCallback(IDirect3DRMTexture3
*iface
,
409 D3DRMOBJECTCALLBACK cb
, void *ctx
)
411 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
416 static HRESULT WINAPI
d3drm_texture3_DeleteDestroyCallback(IDirect3DRMTexture3
*iface
,
417 D3DRMOBJECTCALLBACK cb
, void *ctx
)
419 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
424 static HRESULT WINAPI
d3drm_texture3_SetAppData(IDirect3DRMTexture3
*iface
, DWORD data
)
426 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture3(iface
);
428 TRACE("iface %p, data %#x.\n", iface
, data
);
430 texture
->app_data
= data
;
435 static DWORD WINAPI
d3drm_texture3_GetAppData(IDirect3DRMTexture3
*iface
)
437 struct d3drm_texture
*texture
= impl_from_IDirect3DRMTexture3(iface
);
439 TRACE("iface %p.\n", iface
);
441 return texture
->app_data
;
444 static HRESULT WINAPI
d3drm_texture3_SetName(IDirect3DRMTexture3
*iface
, const char *name
)
446 FIXME("iface %p, name %s stub!\n", iface
, debugstr_a(name
));
451 static HRESULT WINAPI
d3drm_texture3_GetName(IDirect3DRMTexture3
*iface
, DWORD
*size
, char *name
)
453 FIXME("iface %p, size %p, name %p stub!\n", iface
, size
, name
);
458 static HRESULT WINAPI
d3drm_texture3_GetClassName(IDirect3DRMTexture3
*iface
, DWORD
*size
, char *name
)
460 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
462 if (!size
|| *size
< strlen("Texture") || !name
)
465 strcpy(name
, "Texture");
466 *size
= sizeof("Texture");
471 static HRESULT WINAPI
d3drm_texture3_InitFromFile(IDirect3DRMTexture3
*iface
, const char *filename
)
473 FIXME("iface %p, filename %s stub!\n", iface
, debugstr_a(filename
));
478 static HRESULT WINAPI
d3drm_texture3_InitFromSurface(IDirect3DRMTexture3
*iface
,
479 IDirectDrawSurface
*surface
)
481 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
486 static HRESULT WINAPI
d3drm_texture3_InitFromResource(IDirect3DRMTexture3
*iface
, HRSRC resource
)
488 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
493 static HRESULT WINAPI
d3drm_texture3_Changed(IDirect3DRMTexture3
*iface
,
494 DWORD flags
, DWORD rect_count
, RECT
*rects
)
496 FIXME("iface %p, flags %#x, rect_count %u, rects %p stub!\n", iface
, flags
, rect_count
, rects
);
501 static HRESULT WINAPI
d3drm_texture3_SetColors(IDirect3DRMTexture3
*iface
, DWORD max_colors
)
503 FIXME("iface %p, max_colors %u stub!\n", iface
, max_colors
);
508 static HRESULT WINAPI
d3drm_texture3_SetShades(IDirect3DRMTexture3
*iface
, DWORD max_shades
)
510 FIXME("iface %p, max_shades %u stub!\n", iface
, max_shades
);
515 static HRESULT WINAPI
d3drm_texture3_SetDecalSize(IDirect3DRMTexture3
*iface
, D3DVALUE width
, D3DVALUE height
)
517 FIXME("iface %p, width %.8e, height %.8e stub!\n", iface
, width
, height
);
522 static HRESULT WINAPI
d3drm_texture3_SetDecalOrigin(IDirect3DRMTexture3
*iface
, LONG x
, LONG y
)
524 FIXME("iface %p, x %d, y %d stub!\n", iface
, x
, y
);
529 static HRESULT WINAPI
d3drm_texture3_SetDecalScale(IDirect3DRMTexture3
*iface
, DWORD scale
)
531 FIXME("iface %p, scale %u stub!\n", iface
, scale
);
536 static HRESULT WINAPI
d3drm_texture3_SetDecalTransparency(IDirect3DRMTexture3
*iface
, BOOL transparency
)
538 FIXME("iface %p, transparency %#x stub!\n", iface
, transparency
);
543 static HRESULT WINAPI
d3drm_texture3_SetDecalTransparentColor(IDirect3DRMTexture3
*iface
, D3DCOLOR color
)
545 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
550 static HRESULT WINAPI
d3drm_texture3_GetDecalSize(IDirect3DRMTexture3
*iface
, D3DVALUE
*width
, D3DVALUE
*height
)
552 FIXME("iface %p, width %p, height %p stub!\n", iface
, width
, height
);
557 static HRESULT WINAPI
d3drm_texture3_GetDecalOrigin(IDirect3DRMTexture3
*iface
, LONG
*x
, LONG
*y
)
559 FIXME("iface %p, x %p, y %p stub!\n", iface
, x
, y
);
564 static D3DRMIMAGE
* WINAPI
d3drm_texture3_GetImage(IDirect3DRMTexture3
*iface
)
566 FIXME("iface %p stub!\n", iface
);
571 static DWORD WINAPI
d3drm_texture3_GetShades(IDirect3DRMTexture3
*iface
)
573 FIXME("iface %p stub!\n", iface
);
578 static DWORD WINAPI
d3drm_texture3_GetColors(IDirect3DRMTexture3
*iface
)
580 FIXME("iface %p stub!\n", iface
);
585 static DWORD WINAPI
d3drm_texture3_GetDecalScale(IDirect3DRMTexture3
*iface
)
587 FIXME("iface %p stub!\n", iface
);
592 static BOOL WINAPI
d3drm_texture3_GetDecalTransparency(IDirect3DRMTexture3
*iface
)
594 FIXME("iface %p stub!\n", iface
);
599 static D3DCOLOR WINAPI
d3drm_texture3_GetDecalTransparentColor(IDirect3DRMTexture3
*iface
)
601 FIXME("iface %p stub!\n", iface
);
606 static HRESULT WINAPI
d3drm_texture3_InitFromImage(IDirect3DRMTexture3
*iface
, D3DRMIMAGE
*image
)
608 FIXME("iface %p, image %p stub!\n", iface
, image
);
613 static HRESULT WINAPI
d3drm_texture3_InitFromResource2(IDirect3DRMTexture3
*iface
,
614 HMODULE module
, const char *name
, const char *type
)
616 FIXME("iface %p, module %p, name %s, type %s stub!\n",
617 iface
, module
, debugstr_a(name
), debugstr_a(type
));
622 static HRESULT WINAPI
d3drm_texture3_GenerateMIPMap(IDirect3DRMTexture3
*iface
, DWORD flags
)
624 FIXME("iface %p, flags %#x stub!\n", iface
, flags
);
629 static HRESULT WINAPI
d3drm_texture3_GetSurface(IDirect3DRMTexture3
*iface
,
630 DWORD flags
, IDirectDrawSurface
**surface
)
632 FIXME("iface %p, flags %#x, surface %p stub!\n", iface
, flags
, surface
);
637 static HRESULT WINAPI
d3drm_texture3_SetCacheOptions(IDirect3DRMTexture3
*iface
, LONG importance
, DWORD flags
)
639 FIXME("iface %p, importance %d, flags %#x stub!\n", iface
, importance
, flags
);
644 static HRESULT WINAPI
d3drm_texture3_GetCacheOptions(IDirect3DRMTexture3
*iface
,
645 LONG
*importance
, DWORD
*flags
)
647 FIXME("iface %p, importance %p, flags %p stub!\n", iface
, importance
, flags
);
652 static HRESULT WINAPI
d3drm_texture3_SetDownsampleCallback(IDirect3DRMTexture3
*iface
,
653 D3DRMDOWNSAMPLECALLBACK cb
, void *ctx
)
655 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
660 static HRESULT WINAPI
d3drm_texture3_SetValidationCallback(IDirect3DRMTexture3
*iface
,
661 D3DRMVALIDATIONCALLBACK cb
, void *ctx
)
663 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
668 static const struct IDirect3DRMTexture3Vtbl d3drm_texture3_vtbl
=
670 d3drm_texture3_QueryInterface
,
671 d3drm_texture3_AddRef
,
672 d3drm_texture3_Release
,
673 d3drm_texture3_Clone
,
674 d3drm_texture3_AddDestroyCallback
,
675 d3drm_texture3_DeleteDestroyCallback
,
676 d3drm_texture3_SetAppData
,
677 d3drm_texture3_GetAppData
,
678 d3drm_texture3_SetName
,
679 d3drm_texture3_GetName
,
680 d3drm_texture3_GetClassName
,
681 d3drm_texture3_InitFromFile
,
682 d3drm_texture3_InitFromSurface
,
683 d3drm_texture3_InitFromResource
,
684 d3drm_texture3_Changed
,
685 d3drm_texture3_SetColors
,
686 d3drm_texture3_SetShades
,
687 d3drm_texture3_SetDecalSize
,
688 d3drm_texture3_SetDecalOrigin
,
689 d3drm_texture3_SetDecalScale
,
690 d3drm_texture3_SetDecalTransparency
,
691 d3drm_texture3_SetDecalTransparentColor
,
692 d3drm_texture3_GetDecalSize
,
693 d3drm_texture3_GetDecalOrigin
,
694 d3drm_texture3_GetImage
,
695 d3drm_texture3_GetShades
,
696 d3drm_texture3_GetColors
,
697 d3drm_texture3_GetDecalScale
,
698 d3drm_texture3_GetDecalTransparency
,
699 d3drm_texture3_GetDecalTransparentColor
,
700 d3drm_texture3_InitFromImage
,
701 d3drm_texture3_InitFromResource2
,
702 d3drm_texture3_GenerateMIPMap
,
703 d3drm_texture3_GetSurface
,
704 d3drm_texture3_SetCacheOptions
,
705 d3drm_texture3_GetCacheOptions
,
706 d3drm_texture3_SetDownsampleCallback
,
707 d3drm_texture3_SetValidationCallback
,
710 HRESULT
Direct3DRMTexture_create(REFIID riid
, IUnknown
**out
)
712 struct d3drm_texture
*object
;
714 TRACE("riid %s, out %p.\n", debugstr_guid(riid
), out
);
716 if (!(object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*object
))))
717 return E_OUTOFMEMORY
;
719 object
->IDirect3DRMTexture2_iface
.lpVtbl
= &d3drm_texture2_vtbl
;
720 object
->IDirect3DRMTexture3_iface
.lpVtbl
= &d3drm_texture3_vtbl
;
723 if (IsEqualGUID(riid
, &IID_IDirect3DRMTexture3
))
724 *out
= (IUnknown
*)&object
->IDirect3DRMTexture3_iface
;
726 *out
= (IUnknown
*)&object
->IDirect3DRMTexture2_iface
;