2 * Implementation of IDirect3DRMViewport Interface
4 * Copyright 2012 André Hentschel
6 * This file contains the (internal) driver registration functions,
7 * driver enumeration APIs and DirectDraw creation functions.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include "wine/debug.h"
31 #include "d3drm_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(d3drm
);
36 IDirect3DRMViewport IDirect3DRMViewport_iface
;
37 IDirect3DRMViewport2 IDirect3DRMViewport2_iface
;
39 } IDirect3DRMViewportImpl
;
41 static inline IDirect3DRMViewportImpl
*impl_from_IDirect3DRMViewport(IDirect3DRMViewport
*iface
)
43 return CONTAINING_RECORD(iface
, IDirect3DRMViewportImpl
, IDirect3DRMViewport_iface
);
46 static inline IDirect3DRMViewportImpl
*impl_from_IDirect3DRMViewport2(IDirect3DRMViewport2
*iface
)
48 return CONTAINING_RECORD(iface
, IDirect3DRMViewportImpl
, IDirect3DRMViewport2_iface
);
51 /*** IUnknown methods ***/
52 static HRESULT WINAPI
IDirect3DRMViewportImpl_QueryInterface(IDirect3DRMViewport
* iface
,
53 REFIID riid
, void** object
)
55 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
57 TRACE("(%p/%p)->(%s, %p)\n", iface
, This
, debugstr_guid(riid
), object
);
61 if (IsEqualGUID(riid
, &IID_IUnknown
) ||
62 IsEqualGUID(riid
, &IID_IDirect3DRMViewport
))
64 *object
= &This
->IDirect3DRMViewport_iface
;
66 else if(IsEqualGUID(riid
, &IID_IDirect3DRMViewport2
))
68 *object
= &This
->IDirect3DRMViewport2_iface
;
72 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
76 IDirect3DRMViewport_AddRef(iface
);
80 static ULONG WINAPI
IDirect3DRMViewportImpl_AddRef(IDirect3DRMViewport
* iface
)
82 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
84 TRACE("(%p)\n", This
);
86 return InterlockedIncrement(&This
->ref
);
89 static ULONG WINAPI
IDirect3DRMViewportImpl_Release(IDirect3DRMViewport
* iface
)
91 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
92 ULONG ref
= InterlockedDecrement(&This
->ref
);
94 TRACE("(%p)\n", This
);
97 HeapFree(GetProcessHeap(), 0, This
);
102 /*** IDirect3DRMObject methods ***/
103 static HRESULT WINAPI
IDirect3DRMViewportImpl_Clone(IDirect3DRMViewport
* iface
,
104 LPUNKNOWN unkwn
, REFIID riid
,
107 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
109 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface
, This
, unkwn
, debugstr_guid(riid
), object
);
114 static HRESULT WINAPI
IDirect3DRMViewportImpl_AddDestroyCallback(IDirect3DRMViewport
* iface
,
115 D3DRMOBJECTCALLBACK cb
,
118 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
120 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
125 static HRESULT WINAPI
IDirect3DRMViewportImpl_DeleteDestroyCallback(IDirect3DRMViewport
* iface
,
126 D3DRMOBJECTCALLBACK cb
,
129 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
131 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
136 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetAppData(IDirect3DRMViewport
* iface
,
139 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
141 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, data
);
146 static DWORD WINAPI
IDirect3DRMViewportImpl_GetAppData(IDirect3DRMViewport
* iface
)
148 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
150 FIXME("(%p/%p)->(): stub\n", iface
, This
);
155 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetName(IDirect3DRMViewport
* iface
, LPCSTR name
)
157 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
159 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, name
);
164 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetName(IDirect3DRMViewport
* iface
,
165 LPDWORD size
, LPSTR name
)
167 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
169 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
174 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetClassName(IDirect3DRMViewport
* iface
,
175 LPDWORD size
, LPSTR name
)
177 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
179 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
184 /*** IDirect3DRMViewport methods ***/
185 static HRESULT WINAPI
IDirect3DRMViewportImpl_Init(IDirect3DRMViewport
* iface
,
186 LPDIRECT3DRMDEVICE dev
, LPDIRECT3DRMFRAME camera
,
187 DWORD xpos
, DWORD ypos
,
188 DWORD width
, DWORD height
)
190 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
192 FIXME("(%p/%p)->(%p, %p, %u, %u, %u, %u): stub\n", iface
, This
, dev
, camera
,
193 xpos
, ypos
, width
, height
);
198 static HRESULT WINAPI
IDirect3DRMViewportImpl_Clear(IDirect3DRMViewport
* iface
)
200 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
202 FIXME("(%p/%p)->(): stub\n", iface
, This
);
207 static HRESULT WINAPI
IDirect3DRMViewportImpl_Render(IDirect3DRMViewport
* iface
,
208 LPDIRECT3DRMFRAME frame
)
210 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
212 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
217 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetFront(IDirect3DRMViewport
* iface
, D3DVALUE front
)
219 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
221 FIXME("(%p/%p)->(%f): stub\n", iface
, This
, front
);
226 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetBack(IDirect3DRMViewport
* iface
, D3DVALUE back
)
228 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
230 FIXME("(%p/%p)->(%f): stub\n", iface
, This
, back
);
235 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetField(IDirect3DRMViewport
* iface
, D3DVALUE field
)
237 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
239 FIXME("(%p/%p)->(%f): stub\n", iface
, This
, field
);
244 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetUniformScaling(IDirect3DRMViewport
* iface
, BOOL b
)
246 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
248 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, b
);
253 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetCamera(IDirect3DRMViewport
* iface
,
254 LPDIRECT3DRMFRAME frame
)
256 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
258 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
263 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetProjection(IDirect3DRMViewport
* iface
,
264 D3DRMPROJECTIONTYPE type
)
266 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
268 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, type
);
273 static HRESULT WINAPI
IDirect3DRMViewportImpl_Transform(IDirect3DRMViewport
* iface
,
274 D3DRMVECTOR4D
*d
, D3DVECTOR
*s
)
276 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
278 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, d
, s
);
283 static HRESULT WINAPI
IDirect3DRMViewportImpl_InverseTransform(IDirect3DRMViewport
* iface
,
284 D3DVECTOR
*d
, D3DRMVECTOR4D
*s
)
286 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
288 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, d
, s
);
293 static HRESULT WINAPI
IDirect3DRMViewportImpl_Configure(IDirect3DRMViewport
* iface
, LONG x
, LONG y
,
294 DWORD width
, DWORD height
)
296 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
298 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface
, This
, x
, y
, width
, height
);
303 static HRESULT WINAPI
IDirect3DRMViewportImpl_ForceUpdate(IDirect3DRMViewport
* iface
,
304 DWORD x1
, DWORD y1
, DWORD x2
, DWORD y2
)
306 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
308 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface
, This
, x1
, y1
, x2
, y2
);
313 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetPlane(IDirect3DRMViewport
* iface
,
314 D3DVALUE left
, D3DVALUE right
,
315 D3DVALUE bottom
, D3DVALUE top
)
317 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
319 FIXME("(%p/%p)->(%f, %f, %f, %f): stub\n", iface
, This
, left
, right
, bottom
, top
);
324 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetCamera(IDirect3DRMViewport
* iface
,
325 LPDIRECT3DRMFRAME
* frame
)
327 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
329 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
334 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetDevice(IDirect3DRMViewport
* iface
,
335 LPDIRECT3DRMDEVICE
* device
)
337 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
339 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, device
);
344 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetPlane(IDirect3DRMViewport
* iface
,
345 D3DVALUE
*left
, D3DVALUE
*right
,
346 D3DVALUE
*bottom
, D3DVALUE
*top
)
348 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
350 FIXME("(%p/%p)->(%p, %p, %p, %p): stub\n", iface
, This
, left
, right
, bottom
, top
);
355 static HRESULT WINAPI
IDirect3DRMViewportImpl_Pick(IDirect3DRMViewport
* iface
, LONG x
, LONG y
,
356 LPDIRECT3DRMPICKEDARRAY
*return_visuals
)
358 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
360 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface
, This
, x
, y
, return_visuals
);
365 static BOOL WINAPI
IDirect3DRMViewportImpl_GetUniformScaling(IDirect3DRMViewport
* iface
)
367 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
369 FIXME("(%p/%p)->(): stub\n", iface
, This
);
374 static LONG WINAPI
IDirect3DRMViewportImpl_GetX(IDirect3DRMViewport
* iface
)
376 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
378 FIXME("(%p/%p)->(): stub\n", iface
, This
);
383 static LONG WINAPI
IDirect3DRMViewportImpl_GetY(IDirect3DRMViewport
* iface
)
385 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
387 FIXME("(%p/%p)->(): stub\n", iface
, This
);
392 static DWORD WINAPI
IDirect3DRMViewportImpl_GetWidth(IDirect3DRMViewport
* iface
)
394 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
396 FIXME("(%p/%p)->(): stub\n", iface
, This
);
401 static DWORD WINAPI
IDirect3DRMViewportImpl_GetHeight(IDirect3DRMViewport
* iface
)
403 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
405 FIXME("(%p/%p)->(): stub\n", iface
, This
);
410 static D3DVALUE WINAPI
IDirect3DRMViewportImpl_GetField(IDirect3DRMViewport
* iface
)
412 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
414 FIXME("(%p/%p)->(): stub\n", iface
, This
);
419 static D3DVALUE WINAPI
IDirect3DRMViewportImpl_GetBack(IDirect3DRMViewport
* iface
)
421 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
423 FIXME("(%p/%p)->(): stub\n", iface
, This
);
428 static D3DVALUE WINAPI
IDirect3DRMViewportImpl_GetFront(IDirect3DRMViewport
* iface
)
430 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
432 FIXME("(%p/%p)->(): stub\n", iface
, This
);
437 static D3DRMPROJECTIONTYPE WINAPI
IDirect3DRMViewportImpl_GetProjection(IDirect3DRMViewport
* iface
)
439 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
441 FIXME("(%p/%p)->(): stub\n", iface
, This
);
446 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetDirect3DViewport(IDirect3DRMViewport
* iface
,
447 LPDIRECT3DVIEWPORT
* viewport
)
449 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
451 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, This
);
456 static const struct IDirect3DRMViewportVtbl Direct3DRMViewport_Vtbl
=
458 /*** IUnknown methods ***/
459 IDirect3DRMViewportImpl_QueryInterface
,
460 IDirect3DRMViewportImpl_AddRef
,
461 IDirect3DRMViewportImpl_Release
,
462 /*** IDirect3DRMObject methods ***/
463 IDirect3DRMViewportImpl_Clone
,
464 IDirect3DRMViewportImpl_AddDestroyCallback
,
465 IDirect3DRMViewportImpl_DeleteDestroyCallback
,
466 IDirect3DRMViewportImpl_SetAppData
,
467 IDirect3DRMViewportImpl_GetAppData
,
468 IDirect3DRMViewportImpl_SetName
,
469 IDirect3DRMViewportImpl_GetName
,
470 IDirect3DRMViewportImpl_GetClassName
,
471 /*** IDirect3DRMViewport methods ***/
472 IDirect3DRMViewportImpl_Init
,
473 IDirect3DRMViewportImpl_Clear
,
474 IDirect3DRMViewportImpl_Render
,
475 IDirect3DRMViewportImpl_SetFront
,
476 IDirect3DRMViewportImpl_SetBack
,
477 IDirect3DRMViewportImpl_SetField
,
478 IDirect3DRMViewportImpl_SetUniformScaling
,
479 IDirect3DRMViewportImpl_SetCamera
,
480 IDirect3DRMViewportImpl_SetProjection
,
481 IDirect3DRMViewportImpl_Transform
,
482 IDirect3DRMViewportImpl_InverseTransform
,
483 IDirect3DRMViewportImpl_Configure
,
484 IDirect3DRMViewportImpl_ForceUpdate
,
485 IDirect3DRMViewportImpl_SetPlane
,
486 IDirect3DRMViewportImpl_GetCamera
,
487 IDirect3DRMViewportImpl_GetDevice
,
488 IDirect3DRMViewportImpl_GetPlane
,
489 IDirect3DRMViewportImpl_Pick
,
490 IDirect3DRMViewportImpl_GetUniformScaling
,
491 IDirect3DRMViewportImpl_GetX
,
492 IDirect3DRMViewportImpl_GetY
,
493 IDirect3DRMViewportImpl_GetWidth
,
494 IDirect3DRMViewportImpl_GetHeight
,
495 IDirect3DRMViewportImpl_GetField
,
496 IDirect3DRMViewportImpl_GetBack
,
497 IDirect3DRMViewportImpl_GetFront
,
498 IDirect3DRMViewportImpl_GetProjection
,
499 IDirect3DRMViewportImpl_GetDirect3DViewport
503 /*** IUnknown methods ***/
504 static HRESULT WINAPI
IDirect3DRMViewport2Impl_QueryInterface(IDirect3DRMViewport2
* iface
,
505 REFIID riid
, void** object
)
507 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
508 return IDirect3DRMViewport_QueryInterface(&This
->IDirect3DRMViewport_iface
, riid
, object
);
511 static ULONG WINAPI
IDirect3DRMViewport2Impl_AddRef(IDirect3DRMViewport2
* iface
)
513 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
514 return IDirect3DRMViewport_AddRef(&This
->IDirect3DRMViewport_iface
);
517 static ULONG WINAPI
IDirect3DRMViewport2Impl_Release(IDirect3DRMViewport2
* iface
)
519 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
520 return IDirect3DRMViewport_Release(&This
->IDirect3DRMViewport_iface
);
523 /*** IDirect3DRMObject methods ***/
524 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Clone(IDirect3DRMViewport2
* iface
,
525 LPUNKNOWN unkwn
, REFIID riid
,
528 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
530 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface
, This
, unkwn
, debugstr_guid(riid
), object
);
535 static HRESULT WINAPI
IDirect3DRMViewport2Impl_AddDestroyCallback(IDirect3DRMViewport2
* iface
,
536 D3DRMOBJECTCALLBACK cb
,
539 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
541 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
546 static HRESULT WINAPI
IDirect3DRMViewport2Impl_DeleteDestroyCallback(IDirect3DRMViewport2
* iface
,
547 D3DRMOBJECTCALLBACK cb
,
550 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
552 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
557 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetAppData(IDirect3DRMViewport2
* iface
,
560 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
562 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, data
);
567 static DWORD WINAPI
IDirect3DRMViewport2Impl_GetAppData(IDirect3DRMViewport2
* iface
)
569 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
571 FIXME("(%p/%p)->(): stub\n", iface
, This
);
576 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetName(IDirect3DRMViewport2
* iface
, LPCSTR name
)
578 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
580 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, name
);
585 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetName(IDirect3DRMViewport2
* iface
,
586 LPDWORD size
, LPSTR name
)
588 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
590 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
595 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetClassName(IDirect3DRMViewport2
* iface
,
596 LPDWORD size
, LPSTR name
)
598 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
600 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
605 /*** IDirect3DRMViewport methods ***/
606 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Init(IDirect3DRMViewport2
* iface
,
607 LPDIRECT3DRMDEVICE3 dev
, LPDIRECT3DRMFRAME3 camera
,
608 DWORD xpos
, DWORD ypos
,
609 DWORD width
, DWORD height
)
611 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
613 FIXME("(%p/%p)->(%p, %p, %u, %u, %u, %u): stub\n", iface
, This
, dev
, camera
,
614 xpos
, ypos
, width
, height
);
619 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Clear(IDirect3DRMViewport2
* iface
, DWORD flags
)
621 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
623 FIXME("(%p/%p)->(): stub\n", iface
, This
);
628 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Render(IDirect3DRMViewport2
* iface
,
629 LPDIRECT3DRMFRAME3 frame
)
631 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
633 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
638 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetFront(IDirect3DRMViewport2
* iface
, D3DVALUE front
)
640 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
642 FIXME("(%p/%p)->(%f): stub\n", iface
, This
, front
);
647 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetBack(IDirect3DRMViewport2
* iface
, D3DVALUE back
)
649 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
651 FIXME("(%p/%p)->(%f): stub\n", iface
, This
, back
);
656 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetField(IDirect3DRMViewport2
* iface
, D3DVALUE field
)
658 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
660 FIXME("(%p/%p)->(%f): stub\n", iface
, This
, field
);
665 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetUniformScaling(IDirect3DRMViewport2
* iface
, BOOL b
)
667 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
669 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, b
);
674 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetCamera(IDirect3DRMViewport2
* iface
,
675 LPDIRECT3DRMFRAME3 frame
)
677 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
679 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
684 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetProjection(IDirect3DRMViewport2
* iface
,
685 D3DRMPROJECTIONTYPE type
)
687 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
689 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, type
);
694 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Transform(IDirect3DRMViewport2
* iface
,
695 D3DRMVECTOR4D
*d
, D3DVECTOR
*s
)
697 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
699 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, d
, s
);
704 static HRESULT WINAPI
IDirect3DRMViewport2Impl_InverseTransform(IDirect3DRMViewport2
* iface
,
705 D3DVECTOR
*d
, D3DRMVECTOR4D
*s
)
707 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
709 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, d
, s
);
714 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Configure(IDirect3DRMViewport2
* iface
, LONG x
, LONG y
,
715 DWORD width
, DWORD height
)
717 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
719 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface
, This
, x
, y
, width
, height
);
724 static HRESULT WINAPI
IDirect3DRMViewport2Impl_ForceUpdate(IDirect3DRMViewport2
* iface
,
725 DWORD x1
, DWORD y1
, DWORD x2
, DWORD y2
)
727 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
729 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface
, This
, x1
, y1
, x2
, y2
);
734 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetPlane(IDirect3DRMViewport2
* iface
,
735 D3DVALUE left
, D3DVALUE right
,
736 D3DVALUE bottom
, D3DVALUE top
)
738 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
740 FIXME("(%p/%p)->(%f, %f, %f, %f): stub\n", iface
, This
, left
, right
, bottom
, top
);
745 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetCamera(IDirect3DRMViewport2
* iface
,
746 LPDIRECT3DRMFRAME3
* frame
)
748 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
750 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
755 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetDevice(IDirect3DRMViewport2
* iface
,
756 LPDIRECT3DRMDEVICE3
* device
)
758 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
760 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, device
);
765 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetPlane(IDirect3DRMViewport2
* iface
,
766 D3DVALUE
*left
, D3DVALUE
*right
,
767 D3DVALUE
*bottom
, D3DVALUE
*top
)
769 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
771 FIXME("(%p/%p)->(%p, %p, %p, %p): stub\n", iface
, This
, left
, right
, bottom
, top
);
776 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Pick(IDirect3DRMViewport2
* iface
, LONG x
, LONG y
,
777 LPDIRECT3DRMPICKEDARRAY
*return_visuals
)
779 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
781 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface
, This
, x
, y
, return_visuals
);
786 static BOOL WINAPI
IDirect3DRMViewport2Impl_GetUniformScaling(IDirect3DRMViewport2
* iface
)
788 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
790 FIXME("(%p/%p)->(): stub\n", iface
, This
);
795 static LONG WINAPI
IDirect3DRMViewport2Impl_GetX(IDirect3DRMViewport2
* iface
)
797 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
799 FIXME("(%p/%p)->(): stub\n", iface
, This
);
804 static LONG WINAPI
IDirect3DRMViewport2Impl_GetY(IDirect3DRMViewport2
* iface
)
806 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
808 FIXME("(%p/%p)->(): stub\n", iface
, This
);
813 static DWORD WINAPI
IDirect3DRMViewport2Impl_GetWidth(IDirect3DRMViewport2
* iface
)
815 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
817 FIXME("(%p/%p)->(): stub\n", iface
, This
);
822 static DWORD WINAPI
IDirect3DRMViewport2Impl_GetHeight(IDirect3DRMViewport2
* iface
)
824 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
826 FIXME("(%p/%p)->(): stub\n", iface
, This
);
831 static D3DVALUE WINAPI
IDirect3DRMViewport2Impl_GetField(IDirect3DRMViewport2
* iface
)
833 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
835 FIXME("(%p/%p)->(): stub\n", iface
, This
);
840 static D3DVALUE WINAPI
IDirect3DRMViewport2Impl_GetBack(IDirect3DRMViewport2
* iface
)
842 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
844 FIXME("(%p/%p)->(): stub\n", iface
, This
);
849 static D3DVALUE WINAPI
IDirect3DRMViewport2Impl_GetFront(IDirect3DRMViewport2
* iface
)
851 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
853 FIXME("(%p/%p)->(): stub\n", iface
, This
);
858 static D3DRMPROJECTIONTYPE WINAPI
IDirect3DRMViewport2Impl_GetProjection(IDirect3DRMViewport2
* iface
)
860 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
862 FIXME("(%p/%p)->(): stub\n", iface
, This
);
867 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetDirect3DViewport(IDirect3DRMViewport2
* iface
,
868 LPDIRECT3DVIEWPORT
* viewport
)
870 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
872 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, This
);
877 /*** IDirect3DRMViewport2 methods ***/
878 static HRESULT WINAPI
IDirect3DRMViewport2Impl_TransformVectors(IDirect3DRMViewport2
* iface
,
880 LPD3DRMVECTOR4D dstvectors
,
881 LPD3DVECTOR srcvectors
)
883 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
885 FIXME("(%p/%p)->(%u, %p, %p): stub\n", iface
, This
, numvectors
, dstvectors
, srcvectors
);
890 static HRESULT WINAPI
IDirect3DRMViewport2Impl_InverseTransformVectors(IDirect3DRMViewport2
* iface
,
892 LPD3DVECTOR dstvectors
,
893 LPD3DRMVECTOR4D srcvectors
)
895 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
897 FIXME("(%p/%p)->(%u, %p, %p): stub\n", iface
, This
, numvectors
, dstvectors
, srcvectors
);
902 static const struct IDirect3DRMViewport2Vtbl Direct3DRMViewport2_Vtbl
=
904 /*** IUnknown methods ***/
905 IDirect3DRMViewport2Impl_QueryInterface
,
906 IDirect3DRMViewport2Impl_AddRef
,
907 IDirect3DRMViewport2Impl_Release
,
908 /*** IDirect3DRMObject methods ***/
909 IDirect3DRMViewport2Impl_Clone
,
910 IDirect3DRMViewport2Impl_AddDestroyCallback
,
911 IDirect3DRMViewport2Impl_DeleteDestroyCallback
,
912 IDirect3DRMViewport2Impl_SetAppData
,
913 IDirect3DRMViewport2Impl_GetAppData
,
914 IDirect3DRMViewport2Impl_SetName
,
915 IDirect3DRMViewport2Impl_GetName
,
916 IDirect3DRMViewport2Impl_GetClassName
,
917 /*** IDirect3DRMViewport methods ***/
918 IDirect3DRMViewport2Impl_Init
,
919 IDirect3DRMViewport2Impl_Clear
,
920 IDirect3DRMViewport2Impl_Render
,
921 IDirect3DRMViewport2Impl_SetFront
,
922 IDirect3DRMViewport2Impl_SetBack
,
923 IDirect3DRMViewport2Impl_SetField
,
924 IDirect3DRMViewport2Impl_SetUniformScaling
,
925 IDirect3DRMViewport2Impl_SetCamera
,
926 IDirect3DRMViewport2Impl_SetProjection
,
927 IDirect3DRMViewport2Impl_Transform
,
928 IDirect3DRMViewport2Impl_InverseTransform
,
929 IDirect3DRMViewport2Impl_Configure
,
930 IDirect3DRMViewport2Impl_ForceUpdate
,
931 IDirect3DRMViewport2Impl_SetPlane
,
932 IDirect3DRMViewport2Impl_GetCamera
,
933 IDirect3DRMViewport2Impl_GetDevice
,
934 IDirect3DRMViewport2Impl_GetPlane
,
935 IDirect3DRMViewport2Impl_Pick
,
936 IDirect3DRMViewport2Impl_GetUniformScaling
,
937 IDirect3DRMViewport2Impl_GetX
,
938 IDirect3DRMViewport2Impl_GetY
,
939 IDirect3DRMViewport2Impl_GetWidth
,
940 IDirect3DRMViewport2Impl_GetHeight
,
941 IDirect3DRMViewport2Impl_GetField
,
942 IDirect3DRMViewport2Impl_GetBack
,
943 IDirect3DRMViewport2Impl_GetFront
,
944 IDirect3DRMViewport2Impl_GetProjection
,
945 IDirect3DRMViewport2Impl_GetDirect3DViewport
,
946 /*** IDirect3DRMViewport2 methods ***/
947 IDirect3DRMViewport2Impl_TransformVectors
,
948 IDirect3DRMViewport2Impl_InverseTransformVectors
951 HRESULT
Direct3DRMViewport_create(REFIID riid
, IUnknown
** ppObj
)
953 IDirect3DRMViewportImpl
* object
;
955 TRACE("(%p)\n", ppObj
);
957 object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(IDirect3DRMViewportImpl
));
960 ERR("Out of memory\n");
961 return E_OUTOFMEMORY
;
964 object
->IDirect3DRMViewport_iface
.lpVtbl
= &Direct3DRMViewport_Vtbl
;
965 object
->IDirect3DRMViewport2_iface
.lpVtbl
= &Direct3DRMViewport2_Vtbl
;
968 if (IsEqualGUID(riid
, &IID_IDirect3DRMViewport2
))
969 *ppObj
= (IUnknown
*)&object
->IDirect3DRMViewport2_iface
;
971 *ppObj
= (IUnknown
*)&object
->IDirect3DRMViewport_iface
;