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
;
42 D3DRMPROJECTIONTYPE projection
;
43 } IDirect3DRMViewportImpl
;
45 static inline IDirect3DRMViewportImpl
*impl_from_IDirect3DRMViewport(IDirect3DRMViewport
*iface
)
47 return CONTAINING_RECORD(iface
, IDirect3DRMViewportImpl
, IDirect3DRMViewport_iface
);
50 static inline IDirect3DRMViewportImpl
*impl_from_IDirect3DRMViewport2(IDirect3DRMViewport2
*iface
)
52 return CONTAINING_RECORD(iface
, IDirect3DRMViewportImpl
, IDirect3DRMViewport2_iface
);
55 /*** IUnknown methods ***/
56 static HRESULT WINAPI
IDirect3DRMViewportImpl_QueryInterface(IDirect3DRMViewport
* iface
,
57 REFIID riid
, void** object
)
59 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
61 TRACE("(%p/%p)->(%s, %p)\n", iface
, This
, debugstr_guid(riid
), object
);
65 if (IsEqualGUID(riid
, &IID_IUnknown
) ||
66 IsEqualGUID(riid
, &IID_IDirect3DRMViewport
))
68 *object
= &This
->IDirect3DRMViewport_iface
;
70 else if(IsEqualGUID(riid
, &IID_IDirect3DRMViewport2
))
72 *object
= &This
->IDirect3DRMViewport2_iface
;
76 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
80 IDirect3DRMViewport_AddRef(iface
);
84 static ULONG WINAPI
IDirect3DRMViewportImpl_AddRef(IDirect3DRMViewport
* iface
)
86 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
87 ULONG ref
= InterlockedIncrement(&This
->ref
);
89 TRACE("(%p)->(): new ref = %d\n", This
, ref
);
94 static ULONG WINAPI
IDirect3DRMViewportImpl_Release(IDirect3DRMViewport
* iface
)
96 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
97 ULONG ref
= InterlockedDecrement(&This
->ref
);
99 TRACE("(%p)->(): new ref = %d\n", This
, ref
);
102 HeapFree(GetProcessHeap(), 0, This
);
107 /*** IDirect3DRMObject methods ***/
108 static HRESULT WINAPI
IDirect3DRMViewportImpl_Clone(IDirect3DRMViewport
* iface
,
109 LPUNKNOWN unkwn
, REFIID riid
,
112 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
114 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface
, This
, unkwn
, debugstr_guid(riid
), object
);
119 static HRESULT WINAPI
IDirect3DRMViewportImpl_AddDestroyCallback(IDirect3DRMViewport
* iface
,
120 D3DRMOBJECTCALLBACK cb
,
123 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
125 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
130 static HRESULT WINAPI
IDirect3DRMViewportImpl_DeleteDestroyCallback(IDirect3DRMViewport
* iface
,
131 D3DRMOBJECTCALLBACK cb
,
134 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
136 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
141 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetAppData(IDirect3DRMViewport
* iface
,
144 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
146 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, data
);
151 static DWORD WINAPI
IDirect3DRMViewportImpl_GetAppData(IDirect3DRMViewport
* iface
)
153 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
155 FIXME("(%p/%p)->(): stub\n", iface
, This
);
160 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetName(IDirect3DRMViewport
* iface
, LPCSTR name
)
162 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
164 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, name
);
169 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetName(IDirect3DRMViewport
* iface
,
170 LPDWORD size
, LPSTR name
)
172 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
174 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
179 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetClassName(IDirect3DRMViewport
* iface
,
180 LPDWORD size
, LPSTR name
)
182 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
184 TRACE("(%p/%p)->(%p, %p)\n", iface
, This
, size
, name
);
186 return IDirect3DRMViewport2_GetClassName(&This
->IDirect3DRMViewport2_iface
, size
, name
);
189 /*** IDirect3DRMViewport methods ***/
190 static HRESULT WINAPI
IDirect3DRMViewportImpl_Init(IDirect3DRMViewport
* iface
,
191 LPDIRECT3DRMDEVICE dev
, LPDIRECT3DRMFRAME camera
,
192 DWORD xpos
, DWORD ypos
,
193 DWORD width
, DWORD height
)
195 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
197 FIXME("(%p/%p)->(%p, %p, %u, %u, %u, %u): stub\n", iface
, This
, dev
, camera
,
198 xpos
, ypos
, width
, height
);
203 static HRESULT WINAPI
IDirect3DRMViewportImpl_Clear(IDirect3DRMViewport
* iface
)
205 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
207 FIXME("(%p/%p)->(): stub\n", iface
, This
);
212 static HRESULT WINAPI
IDirect3DRMViewportImpl_Render(IDirect3DRMViewport
* iface
,
213 LPDIRECT3DRMFRAME frame
)
215 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
217 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
222 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetFront(IDirect3DRMViewport
* iface
, D3DVALUE front
)
224 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
226 TRACE("(%p/%p)->(%f)\n", iface
, This
, front
);
228 return IDirect3DRMViewport2_SetFront(&This
->IDirect3DRMViewport2_iface
, front
);
231 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetBack(IDirect3DRMViewport
* iface
, D3DVALUE back
)
233 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
235 TRACE("(%p/%p)->(%f)\n", iface
, This
, back
);
237 return IDirect3DRMViewport2_SetBack(&This
->IDirect3DRMViewport2_iface
, back
);
240 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetField(IDirect3DRMViewport
* iface
, D3DVALUE field
)
242 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
244 TRACE("(%p/%p)->(%f)\n", iface
, This
, field
);
246 return IDirect3DRMViewport2_SetField(&This
->IDirect3DRMViewport2_iface
, field
);
249 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetUniformScaling(IDirect3DRMViewport
* iface
, BOOL b
)
251 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
253 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, b
);
258 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetCamera(IDirect3DRMViewport
* iface
,
259 LPDIRECT3DRMFRAME frame
)
261 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
263 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
268 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetProjection(IDirect3DRMViewport
* iface
,
269 D3DRMPROJECTIONTYPE type
)
271 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
273 TRACE("(%p/%p)->(%u)\n", iface
, This
, type
);
275 return IDirect3DRMViewport2_SetProjection(&This
->IDirect3DRMViewport2_iface
, type
);
278 static HRESULT WINAPI
IDirect3DRMViewportImpl_Transform(IDirect3DRMViewport
* iface
,
279 D3DRMVECTOR4D
*d
, D3DVECTOR
*s
)
281 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
283 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, d
, s
);
288 static HRESULT WINAPI
IDirect3DRMViewportImpl_InverseTransform(IDirect3DRMViewport
* iface
,
289 D3DVECTOR
*d
, D3DRMVECTOR4D
*s
)
291 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
293 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, d
, s
);
298 static HRESULT WINAPI
IDirect3DRMViewportImpl_Configure(IDirect3DRMViewport
* iface
, LONG x
, LONG y
,
299 DWORD width
, DWORD height
)
301 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
303 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface
, This
, x
, y
, width
, height
);
308 static HRESULT WINAPI
IDirect3DRMViewportImpl_ForceUpdate(IDirect3DRMViewport
* iface
,
309 DWORD x1
, DWORD y1
, DWORD x2
, DWORD y2
)
311 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
313 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface
, This
, x1
, y1
, x2
, y2
);
318 static HRESULT WINAPI
IDirect3DRMViewportImpl_SetPlane(IDirect3DRMViewport
* iface
,
319 D3DVALUE left
, D3DVALUE right
,
320 D3DVALUE bottom
, D3DVALUE top
)
322 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
324 FIXME("(%p/%p)->(%f, %f, %f, %f): stub\n", iface
, This
, left
, right
, bottom
, top
);
329 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetCamera(IDirect3DRMViewport
* iface
,
330 LPDIRECT3DRMFRAME
* frame
)
332 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
334 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
339 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetDevice(IDirect3DRMViewport
* iface
,
340 LPDIRECT3DRMDEVICE
* device
)
342 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
344 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, device
);
349 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetPlane(IDirect3DRMViewport
* iface
,
350 D3DVALUE
*left
, D3DVALUE
*right
,
351 D3DVALUE
*bottom
, D3DVALUE
*top
)
353 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
355 FIXME("(%p/%p)->(%p, %p, %p, %p): stub\n", iface
, This
, left
, right
, bottom
, top
);
360 static HRESULT WINAPI
IDirect3DRMViewportImpl_Pick(IDirect3DRMViewport
* iface
, LONG x
, LONG y
,
361 LPDIRECT3DRMPICKEDARRAY
*return_visuals
)
363 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
365 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface
, This
, x
, y
, return_visuals
);
370 static BOOL WINAPI
IDirect3DRMViewportImpl_GetUniformScaling(IDirect3DRMViewport
* iface
)
372 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
374 FIXME("(%p/%p)->(): stub\n", iface
, This
);
379 static LONG WINAPI
IDirect3DRMViewportImpl_GetX(IDirect3DRMViewport
* iface
)
381 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
383 FIXME("(%p/%p)->(): stub\n", iface
, This
);
388 static LONG WINAPI
IDirect3DRMViewportImpl_GetY(IDirect3DRMViewport
* iface
)
390 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
392 FIXME("(%p/%p)->(): stub\n", iface
, This
);
397 static DWORD WINAPI
IDirect3DRMViewportImpl_GetWidth(IDirect3DRMViewport
* iface
)
399 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
401 FIXME("(%p/%p)->(): stub\n", iface
, This
);
406 static DWORD WINAPI
IDirect3DRMViewportImpl_GetHeight(IDirect3DRMViewport
* iface
)
408 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
410 FIXME("(%p/%p)->(): stub\n", iface
, This
);
415 static D3DVALUE WINAPI
IDirect3DRMViewportImpl_GetField(IDirect3DRMViewport
* iface
)
417 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
419 TRACE("(%p/%p)->()\n", iface
, This
);
421 return IDirect3DRMViewport2_GetField(&This
->IDirect3DRMViewport2_iface
);
424 static D3DVALUE WINAPI
IDirect3DRMViewportImpl_GetBack(IDirect3DRMViewport
* iface
)
426 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
428 TRACE("(%p/%p)->()\n", iface
, This
);
430 return IDirect3DRMViewport2_GetBack(&This
->IDirect3DRMViewport2_iface
);
433 static D3DVALUE WINAPI
IDirect3DRMViewportImpl_GetFront(IDirect3DRMViewport
* iface
)
435 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
437 TRACE("(%p/%p)->()\n", iface
, This
);
439 return IDirect3DRMViewport2_GetFront(&This
->IDirect3DRMViewport2_iface
);
442 static D3DRMPROJECTIONTYPE WINAPI
IDirect3DRMViewportImpl_GetProjection(IDirect3DRMViewport
* iface
)
444 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
446 TRACE("(%p/%p)->()\n", iface
, This
);
448 return IDirect3DRMViewport2_GetProjection(&This
->IDirect3DRMViewport2_iface
);
451 static HRESULT WINAPI
IDirect3DRMViewportImpl_GetDirect3DViewport(IDirect3DRMViewport
* iface
,
452 LPDIRECT3DVIEWPORT
* viewport
)
454 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport(iface
);
456 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, This
);
461 static const struct IDirect3DRMViewportVtbl Direct3DRMViewport_Vtbl
=
463 /*** IUnknown methods ***/
464 IDirect3DRMViewportImpl_QueryInterface
,
465 IDirect3DRMViewportImpl_AddRef
,
466 IDirect3DRMViewportImpl_Release
,
467 /*** IDirect3DRMObject methods ***/
468 IDirect3DRMViewportImpl_Clone
,
469 IDirect3DRMViewportImpl_AddDestroyCallback
,
470 IDirect3DRMViewportImpl_DeleteDestroyCallback
,
471 IDirect3DRMViewportImpl_SetAppData
,
472 IDirect3DRMViewportImpl_GetAppData
,
473 IDirect3DRMViewportImpl_SetName
,
474 IDirect3DRMViewportImpl_GetName
,
475 IDirect3DRMViewportImpl_GetClassName
,
476 /*** IDirect3DRMViewport methods ***/
477 IDirect3DRMViewportImpl_Init
,
478 IDirect3DRMViewportImpl_Clear
,
479 IDirect3DRMViewportImpl_Render
,
480 IDirect3DRMViewportImpl_SetFront
,
481 IDirect3DRMViewportImpl_SetBack
,
482 IDirect3DRMViewportImpl_SetField
,
483 IDirect3DRMViewportImpl_SetUniformScaling
,
484 IDirect3DRMViewportImpl_SetCamera
,
485 IDirect3DRMViewportImpl_SetProjection
,
486 IDirect3DRMViewportImpl_Transform
,
487 IDirect3DRMViewportImpl_InverseTransform
,
488 IDirect3DRMViewportImpl_Configure
,
489 IDirect3DRMViewportImpl_ForceUpdate
,
490 IDirect3DRMViewportImpl_SetPlane
,
491 IDirect3DRMViewportImpl_GetCamera
,
492 IDirect3DRMViewportImpl_GetDevice
,
493 IDirect3DRMViewportImpl_GetPlane
,
494 IDirect3DRMViewportImpl_Pick
,
495 IDirect3DRMViewportImpl_GetUniformScaling
,
496 IDirect3DRMViewportImpl_GetX
,
497 IDirect3DRMViewportImpl_GetY
,
498 IDirect3DRMViewportImpl_GetWidth
,
499 IDirect3DRMViewportImpl_GetHeight
,
500 IDirect3DRMViewportImpl_GetField
,
501 IDirect3DRMViewportImpl_GetBack
,
502 IDirect3DRMViewportImpl_GetFront
,
503 IDirect3DRMViewportImpl_GetProjection
,
504 IDirect3DRMViewportImpl_GetDirect3DViewport
508 /*** IUnknown methods ***/
509 static HRESULT WINAPI
IDirect3DRMViewport2Impl_QueryInterface(IDirect3DRMViewport2
* iface
,
510 REFIID riid
, void** object
)
512 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
513 return IDirect3DRMViewport_QueryInterface(&This
->IDirect3DRMViewport_iface
, riid
, object
);
516 static ULONG WINAPI
IDirect3DRMViewport2Impl_AddRef(IDirect3DRMViewport2
* iface
)
518 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
519 return IDirect3DRMViewport_AddRef(&This
->IDirect3DRMViewport_iface
);
522 static ULONG WINAPI
IDirect3DRMViewport2Impl_Release(IDirect3DRMViewport2
* iface
)
524 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
525 return IDirect3DRMViewport_Release(&This
->IDirect3DRMViewport_iface
);
528 /*** IDirect3DRMObject methods ***/
529 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Clone(IDirect3DRMViewport2
* iface
,
530 LPUNKNOWN unkwn
, REFIID riid
,
533 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
535 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface
, This
, unkwn
, debugstr_guid(riid
), object
);
540 static HRESULT WINAPI
IDirect3DRMViewport2Impl_AddDestroyCallback(IDirect3DRMViewport2
* iface
,
541 D3DRMOBJECTCALLBACK cb
,
544 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
546 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
551 static HRESULT WINAPI
IDirect3DRMViewport2Impl_DeleteDestroyCallback(IDirect3DRMViewport2
* iface
,
552 D3DRMOBJECTCALLBACK cb
,
555 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
557 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
562 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetAppData(IDirect3DRMViewport2
* iface
,
565 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
567 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, data
);
572 static DWORD WINAPI
IDirect3DRMViewport2Impl_GetAppData(IDirect3DRMViewport2
* iface
)
574 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
576 FIXME("(%p/%p)->(): stub\n", iface
, This
);
581 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetName(IDirect3DRMViewport2
* iface
, LPCSTR name
)
583 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
585 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, name
);
590 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetName(IDirect3DRMViewport2
* iface
,
591 LPDWORD size
, LPSTR name
)
593 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
595 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
600 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetClassName(IDirect3DRMViewport2
* iface
,
601 LPDWORD size
, LPSTR name
)
603 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
605 TRACE("(%p/%p)->(%p, %p)\n", iface
, This
, size
, name
);
607 if (!size
|| *size
< strlen("Viewport") || !name
)
610 strcpy(name
, "Viewport");
611 *size
= sizeof("Viewport");
616 /*** IDirect3DRMViewport methods ***/
617 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Init(IDirect3DRMViewport2
* iface
,
618 LPDIRECT3DRMDEVICE3 dev
, LPDIRECT3DRMFRAME3 camera
,
619 DWORD xpos
, DWORD ypos
,
620 DWORD width
, DWORD height
)
622 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
624 FIXME("(%p/%p)->(%p, %p, %u, %u, %u, %u): stub\n", iface
, This
, dev
, camera
,
625 xpos
, ypos
, width
, height
);
630 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Clear(IDirect3DRMViewport2
* iface
, DWORD flags
)
632 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
634 FIXME("(%p/%p)->(): stub\n", iface
, This
);
639 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Render(IDirect3DRMViewport2
* iface
,
640 LPDIRECT3DRMFRAME3 frame
)
642 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
644 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
649 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetFront(IDirect3DRMViewport2
* iface
, D3DVALUE front
)
651 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
653 TRACE("(%p/%p)->(%f):\n", iface
, This
, front
);
660 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetBack(IDirect3DRMViewport2
* iface
, D3DVALUE back
)
662 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
664 TRACE("(%p/%p)->(%f)\n", iface
, This
, back
);
671 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetField(IDirect3DRMViewport2
* iface
, D3DVALUE field
)
673 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
675 TRACE("(%p/%p)->(%f)\n", iface
, This
, field
);
682 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetUniformScaling(IDirect3DRMViewport2
* iface
, BOOL b
)
684 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
686 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, b
);
691 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetCamera(IDirect3DRMViewport2
* iface
,
692 LPDIRECT3DRMFRAME3 frame
)
694 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
696 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
701 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetProjection(IDirect3DRMViewport2
* iface
,
702 D3DRMPROJECTIONTYPE type
)
704 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
706 TRACE("(%p/%p)->(%u)\n", iface
, This
, type
);
708 This
->projection
= type
;
713 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Transform(IDirect3DRMViewport2
* iface
,
714 D3DRMVECTOR4D
*d
, D3DVECTOR
*s
)
716 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
718 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, d
, s
);
723 static HRESULT WINAPI
IDirect3DRMViewport2Impl_InverseTransform(IDirect3DRMViewport2
* iface
,
724 D3DVECTOR
*d
, D3DRMVECTOR4D
*s
)
726 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
728 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, d
, s
);
733 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Configure(IDirect3DRMViewport2
* iface
, LONG x
, LONG y
,
734 DWORD width
, DWORD height
)
736 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
738 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface
, This
, x
, y
, width
, height
);
743 static HRESULT WINAPI
IDirect3DRMViewport2Impl_ForceUpdate(IDirect3DRMViewport2
* iface
,
744 DWORD x1
, DWORD y1
, DWORD x2
, DWORD y2
)
746 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
748 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface
, This
, x1
, y1
, x2
, y2
);
753 static HRESULT WINAPI
IDirect3DRMViewport2Impl_SetPlane(IDirect3DRMViewport2
* iface
,
754 D3DVALUE left
, D3DVALUE right
,
755 D3DVALUE bottom
, D3DVALUE top
)
757 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
759 FIXME("(%p/%p)->(%f, %f, %f, %f): stub\n", iface
, This
, left
, right
, bottom
, top
);
764 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetCamera(IDirect3DRMViewport2
* iface
,
765 LPDIRECT3DRMFRAME3
* frame
)
767 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
769 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, frame
);
774 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetDevice(IDirect3DRMViewport2
* iface
,
775 LPDIRECT3DRMDEVICE3
* device
)
777 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
779 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, device
);
784 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetPlane(IDirect3DRMViewport2
* iface
,
785 D3DVALUE
*left
, D3DVALUE
*right
,
786 D3DVALUE
*bottom
, D3DVALUE
*top
)
788 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
790 FIXME("(%p/%p)->(%p, %p, %p, %p): stub\n", iface
, This
, left
, right
, bottom
, top
);
795 static HRESULT WINAPI
IDirect3DRMViewport2Impl_Pick(IDirect3DRMViewport2
* iface
, LONG x
, LONG y
,
796 LPDIRECT3DRMPICKEDARRAY
*return_visuals
)
798 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
800 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface
, This
, x
, y
, return_visuals
);
805 static BOOL WINAPI
IDirect3DRMViewport2Impl_GetUniformScaling(IDirect3DRMViewport2
* iface
)
807 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
809 FIXME("(%p/%p)->(): stub\n", iface
, This
);
814 static LONG WINAPI
IDirect3DRMViewport2Impl_GetX(IDirect3DRMViewport2
* iface
)
816 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
818 FIXME("(%p/%p)->(): stub\n", iface
, This
);
823 static LONG WINAPI
IDirect3DRMViewport2Impl_GetY(IDirect3DRMViewport2
* iface
)
825 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
827 FIXME("(%p/%p)->(): stub\n", iface
, This
);
832 static DWORD WINAPI
IDirect3DRMViewport2Impl_GetWidth(IDirect3DRMViewport2
* iface
)
834 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
836 FIXME("(%p/%p)->(): stub\n", iface
, This
);
841 static DWORD WINAPI
IDirect3DRMViewport2Impl_GetHeight(IDirect3DRMViewport2
* iface
)
843 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
845 FIXME("(%p/%p)->(): stub\n", iface
, This
);
850 static D3DVALUE WINAPI
IDirect3DRMViewport2Impl_GetField(IDirect3DRMViewport2
* iface
)
852 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
854 TRACE("(%p/%p)->()\n", iface
, This
);
859 static D3DVALUE WINAPI
IDirect3DRMViewport2Impl_GetBack(IDirect3DRMViewport2
* iface
)
861 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
863 TRACE("(%p/%p)->()\n", iface
, This
);
868 static D3DVALUE WINAPI
IDirect3DRMViewport2Impl_GetFront(IDirect3DRMViewport2
* iface
)
870 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
872 TRACE("(%p/%p)->()\n", iface
, This
);
877 static D3DRMPROJECTIONTYPE WINAPI
IDirect3DRMViewport2Impl_GetProjection(IDirect3DRMViewport2
* iface
)
879 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
881 TRACE("(%p/%p)->()\n", iface
, This
);
883 return This
->projection
;
886 static HRESULT WINAPI
IDirect3DRMViewport2Impl_GetDirect3DViewport(IDirect3DRMViewport2
* iface
,
887 LPDIRECT3DVIEWPORT
* viewport
)
889 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
891 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, This
);
896 /*** IDirect3DRMViewport2 methods ***/
897 static HRESULT WINAPI
IDirect3DRMViewport2Impl_TransformVectors(IDirect3DRMViewport2
* iface
,
899 LPD3DRMVECTOR4D dstvectors
,
900 LPD3DVECTOR srcvectors
)
902 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
904 FIXME("(%p/%p)->(%u, %p, %p): stub\n", iface
, This
, numvectors
, dstvectors
, srcvectors
);
909 static HRESULT WINAPI
IDirect3DRMViewport2Impl_InverseTransformVectors(IDirect3DRMViewport2
* iface
,
911 LPD3DVECTOR dstvectors
,
912 LPD3DRMVECTOR4D srcvectors
)
914 IDirect3DRMViewportImpl
*This
= impl_from_IDirect3DRMViewport2(iface
);
916 FIXME("(%p/%p)->(%u, %p, %p): stub\n", iface
, This
, numvectors
, dstvectors
, srcvectors
);
921 static const struct IDirect3DRMViewport2Vtbl Direct3DRMViewport2_Vtbl
=
923 /*** IUnknown methods ***/
924 IDirect3DRMViewport2Impl_QueryInterface
,
925 IDirect3DRMViewport2Impl_AddRef
,
926 IDirect3DRMViewport2Impl_Release
,
927 /*** IDirect3DRMObject methods ***/
928 IDirect3DRMViewport2Impl_Clone
,
929 IDirect3DRMViewport2Impl_AddDestroyCallback
,
930 IDirect3DRMViewport2Impl_DeleteDestroyCallback
,
931 IDirect3DRMViewport2Impl_SetAppData
,
932 IDirect3DRMViewport2Impl_GetAppData
,
933 IDirect3DRMViewport2Impl_SetName
,
934 IDirect3DRMViewport2Impl_GetName
,
935 IDirect3DRMViewport2Impl_GetClassName
,
936 /*** IDirect3DRMViewport methods ***/
937 IDirect3DRMViewport2Impl_Init
,
938 IDirect3DRMViewport2Impl_Clear
,
939 IDirect3DRMViewport2Impl_Render
,
940 IDirect3DRMViewport2Impl_SetFront
,
941 IDirect3DRMViewport2Impl_SetBack
,
942 IDirect3DRMViewport2Impl_SetField
,
943 IDirect3DRMViewport2Impl_SetUniformScaling
,
944 IDirect3DRMViewport2Impl_SetCamera
,
945 IDirect3DRMViewport2Impl_SetProjection
,
946 IDirect3DRMViewport2Impl_Transform
,
947 IDirect3DRMViewport2Impl_InverseTransform
,
948 IDirect3DRMViewport2Impl_Configure
,
949 IDirect3DRMViewport2Impl_ForceUpdate
,
950 IDirect3DRMViewport2Impl_SetPlane
,
951 IDirect3DRMViewport2Impl_GetCamera
,
952 IDirect3DRMViewport2Impl_GetDevice
,
953 IDirect3DRMViewport2Impl_GetPlane
,
954 IDirect3DRMViewport2Impl_Pick
,
955 IDirect3DRMViewport2Impl_GetUniformScaling
,
956 IDirect3DRMViewport2Impl_GetX
,
957 IDirect3DRMViewport2Impl_GetY
,
958 IDirect3DRMViewport2Impl_GetWidth
,
959 IDirect3DRMViewport2Impl_GetHeight
,
960 IDirect3DRMViewport2Impl_GetField
,
961 IDirect3DRMViewport2Impl_GetBack
,
962 IDirect3DRMViewport2Impl_GetFront
,
963 IDirect3DRMViewport2Impl_GetProjection
,
964 IDirect3DRMViewport2Impl_GetDirect3DViewport
,
965 /*** IDirect3DRMViewport2 methods ***/
966 IDirect3DRMViewport2Impl_TransformVectors
,
967 IDirect3DRMViewport2Impl_InverseTransformVectors
970 HRESULT
Direct3DRMViewport_create(REFIID riid
, IUnknown
** ppObj
)
972 IDirect3DRMViewportImpl
* object
;
974 TRACE("(%p)\n", ppObj
);
976 object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(IDirect3DRMViewportImpl
));
979 ERR("Out of memory\n");
980 return E_OUTOFMEMORY
;
983 object
->IDirect3DRMViewport_iface
.lpVtbl
= &Direct3DRMViewport_Vtbl
;
984 object
->IDirect3DRMViewport2_iface
.lpVtbl
= &Direct3DRMViewport2_Vtbl
;
987 if (IsEqualGUID(riid
, &IID_IDirect3DRMViewport2
))
988 *ppObj
= (IUnknown
*)&object
->IDirect3DRMViewport2_iface
;
990 *ppObj
= (IUnknown
*)&object
->IDirect3DRMViewport_iface
;