2012-01-13 00:17:02 +01:00
|
|
|
/*
|
|
|
|
* Implementation of IDirect3DRMViewport Interface
|
|
|
|
*
|
|
|
|
* Copyright 2012 André Hentschel
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
|
|
|
|
#include "d3drm_private.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport
|
|
|
|
{
|
2016-03-01 17:45:29 +01:00
|
|
|
struct d3drm_object obj;
|
2012-01-13 00:17:02 +01:00
|
|
|
IDirect3DRMViewport IDirect3DRMViewport_iface;
|
2012-01-17 23:00:50 +01:00
|
|
|
IDirect3DRMViewport2 IDirect3DRMViewport2_iface;
|
2012-06-07 13:43:40 +02:00
|
|
|
D3DVALUE back;
|
2012-06-07 13:44:27 +02:00
|
|
|
D3DVALUE front;
|
2012-06-07 13:46:08 +02:00
|
|
|
D3DVALUE field;
|
2012-06-07 13:47:02 +02:00
|
|
|
D3DRMPROJECTIONTYPE projection;
|
2013-11-01 09:41:02 +01:00
|
|
|
};
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static inline struct d3drm_viewport *impl_from_IDirect3DRMViewport(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
return CONTAINING_RECORD(iface, struct d3drm_viewport, IDirect3DRMViewport_iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static inline struct d3drm_viewport *impl_from_IDirect3DRMViewport2(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
return CONTAINING_RECORD(iface, struct d3drm_viewport, IDirect3DRMViewport2_iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_QueryInterface(IDirect3DRMViewport *iface, REFIID riid, void **out)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
if (IsEqualGUID(riid, &IID_IDirect3DRMViewport)
|
2016-03-03 09:10:20 +01:00
|
|
|
|| IsEqualGUID(riid, &IID_IDirect3DRMObject)
|
2013-11-01 09:41:02 +01:00
|
|
|
|| IsEqualGUID(riid, &IID_IUnknown))
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
*out = &viewport->IDirect3DRMViewport_iface;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
2013-11-01 09:41:02 +01:00
|
|
|
else if (IsEqualGUID(riid, &IID_IDirect3DRMViewport2))
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
*out = &viewport->IDirect3DRMViewport2_iface;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
*out = NULL;
|
|
|
|
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
2012-01-17 23:00:50 +01:00
|
|
|
return E_NOINTERFACE;
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
IUnknown_AddRef((IUnknown *)*out);
|
2012-01-17 23:00:50 +01:00
|
|
|
return S_OK;
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static ULONG WINAPI d3drm_viewport1_AddRef(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2016-03-01 17:45:29 +01:00
|
|
|
ULONG refcount = InterlockedIncrement(&viewport->obj.ref);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("%p increasing refcount to %u.\n", iface, refcount);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return refcount;
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static ULONG WINAPI d3drm_viewport1_Release(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2016-03-01 17:45:29 +01:00
|
|
|
ULONG refcount = InterlockedDecrement(&viewport->obj.ref);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
if (!refcount)
|
2016-03-03 09:10:21 +01:00
|
|
|
{
|
|
|
|
d3drm_object_cleanup((IDirect3DRMObject*)iface, &viewport->obj);
|
2013-11-01 09:41:02 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, viewport);
|
2016-03-03 09:10:21 +01:00
|
|
|
}
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return refcount;
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_Clone(IDirect3DRMViewport *iface,
|
2013-08-20 10:20:13 +02:00
|
|
|
IUnknown *outer, REFIID iid, void **out)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-08-20 10:20:13 +02:00
|
|
|
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_AddDestroyCallback(IDirect3DRMViewport *iface,
|
2013-09-09 10:26:21 +02:00
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2016-03-03 09:10:21 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2016-03-03 09:10:21 +01:00
|
|
|
TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return IDirect3DRMViewport2_AddDestroyCallback(&viewport->IDirect3DRMViewport2_iface, cb, ctx);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_DeleteDestroyCallback(IDirect3DRMViewport *iface,
|
2013-09-09 10:26:21 +02:00
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2016-03-03 09:10:21 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2016-03-03 09:10:21 +01:00
|
|
|
TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return IDirect3DRMViewport2_DeleteDestroyCallback(&viewport->IDirect3DRMViewport2_iface, cb, ctx);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_SetAppData(IDirect3DRMViewport *iface, DWORD data)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2016-03-01 17:45:29 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2016-03-01 17:45:29 +01:00
|
|
|
TRACE("iface %p, data %#x\n", iface, data);
|
|
|
|
|
|
|
|
return IDirect3DRMViewport2_SetAppData(&viewport->IDirect3DRMViewport2_iface, data);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static DWORD WINAPI d3drm_viewport1_GetAppData(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2016-03-01 17:45:29 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2016-03-01 17:45:29 +01:00
|
|
|
return IDirect3DRMViewport2_GetAppData(&viewport->IDirect3DRMViewport2_iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_SetName(IDirect3DRMViewport *iface, const char *name)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-09-06 09:57:43 +02:00
|
|
|
FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_GetName(IDirect3DRMViewport *iface, DWORD *size, char *name)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_GetClassName(IDirect3DRMViewport *iface, DWORD *size, char *name)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
return IDirect3DRMViewport2_GetClassName(&viewport->IDirect3DRMViewport2_iface, size, name);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_Init(IDirect3DRMViewport *iface, IDirect3DRMDevice *device,
|
2013-04-17 08:48:01 +02:00
|
|
|
IDirect3DRMFrame *camera, DWORD x, DWORD y, DWORD width, DWORD height)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-04-17 08:48:01 +02:00
|
|
|
FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u stub!\n",
|
|
|
|
iface, device, camera, x, y, width, height);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_Clear(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p.\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2012-06-07 13:48:28 +02:00
|
|
|
return D3DRM_OK;
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_Render(IDirect3DRMViewport *iface, IDirect3DRMFrame *frame)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, frame %p stub!\n", iface, frame);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2012-06-07 13:49:30 +02:00
|
|
|
return D3DRM_OK;
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_SetFront(IDirect3DRMViewport *iface, D3DVALUE front)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p, front %.8e.\n", iface, front);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return IDirect3DRMViewport2_SetFront(&viewport->IDirect3DRMViewport2_iface, front);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_SetBack(IDirect3DRMViewport *iface, D3DVALUE back)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p, back %.8e.\n", iface, back);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return IDirect3DRMViewport2_SetBack(&viewport->IDirect3DRMViewport2_iface, back);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_SetField(IDirect3DRMViewport *iface, D3DVALUE field)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p, field %.8e.\n", iface, field);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return IDirect3DRMViewport2_SetField(&viewport->IDirect3DRMViewport2_iface, field);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_SetUniformScaling(IDirect3DRMViewport *iface, BOOL b)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, b %#x stub!\n", iface, b);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_SetCamera(IDirect3DRMViewport *iface, IDirect3DRMFrame *camera)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, camera %p stub!\n", iface, camera);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_SetProjection(IDirect3DRMViewport *iface, D3DRMPROJECTIONTYPE type)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p, type %#x.\n", iface, type);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return IDirect3DRMViewport2_SetProjection(&viewport->IDirect3DRMViewport2_iface, type);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_Transform(IDirect3DRMViewport *iface, D3DRMVECTOR4D *d, D3DVECTOR *s)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_InverseTransform(IDirect3DRMViewport *iface, D3DVECTOR *d, D3DRMVECTOR4D *s)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_Configure(IDirect3DRMViewport *iface,
|
|
|
|
LONG x, LONG y, DWORD width, DWORD height)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, x %d, y %d, width %u, height %u stub!\n", iface, x, y, width, height);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_ForceUpdate(IDirect3DRMViewport *iface,
|
|
|
|
DWORD x1, DWORD y1, DWORD x2, DWORD y2)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, x1 %u, y1 %u, x2 %u, y2 %u stub!\n", iface, x1, y1, x2, y2);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_SetPlane(IDirect3DRMViewport *iface,
|
|
|
|
D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, left %.8e, right %.8e, bottom %.8e, top %.8e stub!\n",
|
|
|
|
iface, left, right, bottom, top);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_GetCamera(IDirect3DRMViewport *iface, IDirect3DRMFrame **camera)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, camera %p stub!\n", iface, camera);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_GetDevice(IDirect3DRMViewport *iface, IDirect3DRMDevice **device)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-04-17 08:48:01 +02:00
|
|
|
FIXME("iface %p, device %p stub!\n", iface, device);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_GetPlane(IDirect3DRMViewport *iface,
|
|
|
|
D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, left %p, right %p, bottom %p, top %p stub!\n",
|
|
|
|
iface, left, right, bottom, top);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_Pick(IDirect3DRMViewport *iface,
|
2013-08-13 08:51:47 +02:00
|
|
|
LONG x, LONG y, IDirect3DRMPickedArray **visuals)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-08-13 08:51:47 +02:00
|
|
|
FIXME("iface %p, x %d, y %d, visuals %p stub!\n", iface, x, y, visuals);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static BOOL WINAPI d3drm_viewport1_GetUniformScaling(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2015-10-12 21:25:29 +02:00
|
|
|
return FALSE;
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static LONG WINAPI d3drm_viewport1_GetX(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static LONG WINAPI d3drm_viewport1_GetY(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static DWORD WINAPI d3drm_viewport1_GetWidth(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static DWORD WINAPI d3drm_viewport1_GetHeight(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static D3DVALUE WINAPI d3drm_viewport1_GetField(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p.\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return IDirect3DRMViewport2_GetField(&viewport->IDirect3DRMViewport2_iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static D3DVALUE WINAPI d3drm_viewport1_GetBack(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p.\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return IDirect3DRMViewport2_GetBack(&viewport->IDirect3DRMViewport2_iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static D3DVALUE WINAPI d3drm_viewport1_GetFront(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p.\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return IDirect3DRMViewport2_GetFront(&viewport->IDirect3DRMViewport2_iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static D3DRMPROJECTIONTYPE WINAPI d3drm_viewport1_GetProjection(IDirect3DRMViewport *iface)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p.\n", iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return IDirect3DRMViewport2_GetProjection(&viewport->IDirect3DRMViewport2_iface);
|
2012-01-13 00:17:02 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport1_GetDirect3DViewport(IDirect3DRMViewport *iface,
|
2012-11-20 22:40:18 +01:00
|
|
|
IDirect3DViewport **viewport)
|
2012-01-13 00:17:02 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, viewport %p stub!\n", iface, viewport);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRMViewportVtbl d3drm_viewport1_vtbl =
|
|
|
|
{
|
|
|
|
d3drm_viewport1_QueryInterface,
|
|
|
|
d3drm_viewport1_AddRef,
|
|
|
|
d3drm_viewport1_Release,
|
|
|
|
d3drm_viewport1_Clone,
|
|
|
|
d3drm_viewport1_AddDestroyCallback,
|
|
|
|
d3drm_viewport1_DeleteDestroyCallback,
|
|
|
|
d3drm_viewport1_SetAppData,
|
|
|
|
d3drm_viewport1_GetAppData,
|
|
|
|
d3drm_viewport1_SetName,
|
|
|
|
d3drm_viewport1_GetName,
|
|
|
|
d3drm_viewport1_GetClassName,
|
|
|
|
d3drm_viewport1_Init,
|
|
|
|
d3drm_viewport1_Clear,
|
|
|
|
d3drm_viewport1_Render,
|
|
|
|
d3drm_viewport1_SetFront,
|
|
|
|
d3drm_viewport1_SetBack,
|
|
|
|
d3drm_viewport1_SetField,
|
|
|
|
d3drm_viewport1_SetUniformScaling,
|
|
|
|
d3drm_viewport1_SetCamera,
|
|
|
|
d3drm_viewport1_SetProjection,
|
|
|
|
d3drm_viewport1_Transform,
|
|
|
|
d3drm_viewport1_InverseTransform,
|
|
|
|
d3drm_viewport1_Configure,
|
|
|
|
d3drm_viewport1_ForceUpdate,
|
|
|
|
d3drm_viewport1_SetPlane,
|
|
|
|
d3drm_viewport1_GetCamera,
|
|
|
|
d3drm_viewport1_GetDevice,
|
|
|
|
d3drm_viewport1_GetPlane,
|
|
|
|
d3drm_viewport1_Pick,
|
|
|
|
d3drm_viewport1_GetUniformScaling,
|
|
|
|
d3drm_viewport1_GetX,
|
|
|
|
d3drm_viewport1_GetY,
|
|
|
|
d3drm_viewport1_GetWidth,
|
|
|
|
d3drm_viewport1_GetHeight,
|
|
|
|
d3drm_viewport1_GetField,
|
|
|
|
d3drm_viewport1_GetBack,
|
|
|
|
d3drm_viewport1_GetFront,
|
|
|
|
d3drm_viewport1_GetProjection,
|
|
|
|
d3drm_viewport1_GetDirect3DViewport,
|
2012-01-13 00:17:02 +01:00
|
|
|
};
|
2012-01-17 23:00:17 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_QueryInterface(IDirect3DRMViewport2 *iface, REFIID riid, void **out)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
|
|
|
|
|
|
|
return d3drm_viewport1_QueryInterface(&viewport->IDirect3DRMViewport_iface, riid, out);
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static ULONG WINAPI d3drm_viewport2_AddRef(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_viewport1_AddRef(&viewport->IDirect3DRMViewport_iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static ULONG WINAPI d3drm_viewport2_Release(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_viewport1_Release(&viewport->IDirect3DRMViewport_iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_Clone(IDirect3DRMViewport2 *iface,
|
2013-08-20 10:20:13 +02:00
|
|
|
IUnknown *outer, REFIID iid, void **out)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-08-20 10:20:13 +02:00
|
|
|
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_AddDestroyCallback(IDirect3DRMViewport2 *iface,
|
2013-09-09 10:26:21 +02:00
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2016-03-03 09:10:21 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2016-03-03 09:10:21 +01:00
|
|
|
TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return d3drm_object_add_destroy_callback(&viewport->obj, cb, ctx);
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_DeleteDestroyCallback(IDirect3DRMViewport2 *iface,
|
2013-09-09 10:26:21 +02:00
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2016-03-03 09:10:21 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2016-03-03 09:10:21 +01:00
|
|
|
TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return d3drm_object_delete_destroy_callback(&viewport->obj, cb, ctx);
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_SetAppData(IDirect3DRMViewport2 *iface, DWORD data)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2016-03-01 17:45:29 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2016-03-01 17:45:29 +01:00
|
|
|
TRACE("iface %p, data %#x\n", iface, data);
|
|
|
|
|
|
|
|
viewport->obj.appdata = data;
|
|
|
|
return S_OK;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static DWORD WINAPI d3drm_viewport2_GetAppData(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2016-03-01 17:45:29 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p\n", iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2016-03-01 17:45:29 +01:00
|
|
|
return viewport->obj.appdata;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_SetName(IDirect3DRMViewport2 *iface, const char *name)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-09-06 09:57:43 +02:00
|
|
|
FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_GetName(IDirect3DRMViewport2 *iface, DWORD *size, char *name)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_GetClassName(IDirect3DRMViewport2 *iface, DWORD *size, char *name)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2012-06-17 19:07:14 +02:00
|
|
|
if (!size || *size < strlen("Viewport") || !name)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
strcpy(name, "Viewport");
|
|
|
|
*size = sizeof("Viewport");
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_Init(IDirect3DRMViewport2 *iface, IDirect3DRMDevice3 *device,
|
2013-04-18 09:35:15 +02:00
|
|
|
IDirect3DRMFrame3 *camera, DWORD x, DWORD y, DWORD width, DWORD height)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-04-18 09:35:15 +02:00
|
|
|
FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u stub!\n",
|
|
|
|
iface, device, camera, x, y, width, height);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_Clear(IDirect3DRMViewport2 *iface, DWORD flags)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, flags %#x.\n", iface, flags);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2012-06-07 13:48:28 +02:00
|
|
|
return D3DRM_OK;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_Render(IDirect3DRMViewport2 *iface, IDirect3DRMFrame3 *frame)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, frame %p stub!\n", iface, frame);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2012-06-07 13:49:30 +02:00
|
|
|
return D3DRM_OK;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_SetFront(IDirect3DRMViewport2 *iface, D3DVALUE front)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p, front %.8e.\n", iface, front);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
viewport->front = front;
|
2012-06-07 13:44:27 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_SetBack(IDirect3DRMViewport2 *iface, D3DVALUE back)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p, back %.8e.\n", iface, back);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
viewport->back = back;
|
2012-06-07 13:43:40 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_SetField(IDirect3DRMViewport2 *iface, D3DVALUE field)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p, field %.8e.\n", iface, field);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
viewport->field = field;
|
2012-06-07 13:46:08 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_SetUniformScaling(IDirect3DRMViewport2 *iface, BOOL b)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, b %#x stub!\n", iface, b);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_SetCamera(IDirect3DRMViewport2 *iface, IDirect3DRMFrame3 *camera)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, camera %p stub!\n", iface, camera);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_SetProjection(IDirect3DRMViewport2 *iface, D3DRMPROJECTIONTYPE type)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p, type %#x.\n", iface, type);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
viewport->projection = type;
|
2012-06-07 13:47:02 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_Transform(IDirect3DRMViewport2 *iface, D3DRMVECTOR4D *d, D3DVECTOR *s)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_InverseTransform(IDirect3DRMViewport2 *iface, D3DVECTOR *d, D3DRMVECTOR4D *s)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_Configure(IDirect3DRMViewport2 *iface,
|
|
|
|
LONG x, LONG y, DWORD width, DWORD height)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, x %d, y %d, width %u, height %u stub!\n", iface, x, y, width, height);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_ForceUpdate(IDirect3DRMViewport2* iface,
|
|
|
|
DWORD x1, DWORD y1, DWORD x2, DWORD y2)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, x1 %u, y1 %u, x2 %u, y2 %u stub!\n", iface, x1, y1, x2, y2);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_SetPlane(IDirect3DRMViewport2 *iface,
|
|
|
|
D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, left %.8e, right %.8e, bottom %.8e, top %.8e stub!\n",
|
|
|
|
iface, left, right, bottom, top);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_GetCamera(IDirect3DRMViewport2 *iface, IDirect3DRMFrame3 **camera)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, camera %p stub!\n", iface, camera);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_GetDevice(IDirect3DRMViewport2 *iface, IDirect3DRMDevice3 **device)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-04-18 09:35:15 +02:00
|
|
|
FIXME("iface %p, device %p stub!\n", iface, device);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_GetPlane(IDirect3DRMViewport2 *iface,
|
|
|
|
D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, left %p, right %p, bottom %p, top %p stub!\n",
|
|
|
|
iface, left, right, bottom, top);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_Pick(IDirect3DRMViewport2 *iface,
|
2013-08-13 08:51:47 +02:00
|
|
|
LONG x, LONG y, IDirect3DRMPickedArray **visuals)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-08-13 08:51:47 +02:00
|
|
|
FIXME("iface %p, x %d, y %d, visuals %p stub!\n", iface, x, y, visuals);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static BOOL WINAPI d3drm_viewport2_GetUniformScaling(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2015-10-12 21:25:29 +02:00
|
|
|
return FALSE;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static LONG WINAPI d3drm_viewport2_GetX(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static LONG WINAPI d3drm_viewport2_GetY(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static DWORD WINAPI d3drm_viewport2_GetWidth(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static DWORD WINAPI d3drm_viewport2_GetHeight(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static D3DVALUE WINAPI d3drm_viewport2_GetField(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p.\n", iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return viewport->field;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static D3DVALUE WINAPI d3drm_viewport2_GetBack(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p.\n", iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return viewport->back;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static D3DVALUE WINAPI d3drm_viewport2_GetFront(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p.\n", iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return viewport->front;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static D3DRMPROJECTIONTYPE WINAPI d3drm_viewport2_GetProjection(IDirect3DRMViewport2 *iface)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("iface %p.\n", iface);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
return viewport->projection;
|
2012-01-17 23:00:50 +01:00
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_GetDirect3DViewport(IDirect3DRMViewport2 *iface,
|
2012-11-20 22:40:18 +01:00
|
|
|
IDirect3DViewport **viewport)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, viewport %p stub!\n", iface, viewport);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_TransformVectors(IDirect3DRMViewport2 *iface,
|
|
|
|
DWORD vector_count, D3DRMVECTOR4D *dst, D3DVECTOR *src)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, vector_count %u, dst %p, src %p stub!\n", iface, vector_count, dst, src);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static HRESULT WINAPI d3drm_viewport2_InverseTransformVectors(IDirect3DRMViewport2 *iface,
|
|
|
|
DWORD vector_count, D3DVECTOR *dst, D3DRMVECTOR4D *src)
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
FIXME("iface %p, vector_count %u, dst %p, src %p stub!\n", iface, vector_count, dst, src);
|
2012-01-17 23:00:50 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
static const struct IDirect3DRMViewport2Vtbl d3drm_viewport2_vtbl =
|
2012-01-17 23:00:50 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
d3drm_viewport2_QueryInterface,
|
|
|
|
d3drm_viewport2_AddRef,
|
|
|
|
d3drm_viewport2_Release,
|
|
|
|
d3drm_viewport2_Clone,
|
|
|
|
d3drm_viewport2_AddDestroyCallback,
|
|
|
|
d3drm_viewport2_DeleteDestroyCallback,
|
|
|
|
d3drm_viewport2_SetAppData,
|
|
|
|
d3drm_viewport2_GetAppData,
|
|
|
|
d3drm_viewport2_SetName,
|
|
|
|
d3drm_viewport2_GetName,
|
|
|
|
d3drm_viewport2_GetClassName,
|
|
|
|
d3drm_viewport2_Init,
|
|
|
|
d3drm_viewport2_Clear,
|
|
|
|
d3drm_viewport2_Render,
|
|
|
|
d3drm_viewport2_SetFront,
|
|
|
|
d3drm_viewport2_SetBack,
|
|
|
|
d3drm_viewport2_SetField,
|
|
|
|
d3drm_viewport2_SetUniformScaling,
|
|
|
|
d3drm_viewport2_SetCamera,
|
|
|
|
d3drm_viewport2_SetProjection,
|
|
|
|
d3drm_viewport2_Transform,
|
|
|
|
d3drm_viewport2_InverseTransform,
|
|
|
|
d3drm_viewport2_Configure,
|
|
|
|
d3drm_viewport2_ForceUpdate,
|
|
|
|
d3drm_viewport2_SetPlane,
|
|
|
|
d3drm_viewport2_GetCamera,
|
|
|
|
d3drm_viewport2_GetDevice,
|
|
|
|
d3drm_viewport2_GetPlane,
|
|
|
|
d3drm_viewport2_Pick,
|
|
|
|
d3drm_viewport2_GetUniformScaling,
|
|
|
|
d3drm_viewport2_GetX,
|
|
|
|
d3drm_viewport2_GetY,
|
|
|
|
d3drm_viewport2_GetWidth,
|
|
|
|
d3drm_viewport2_GetHeight,
|
|
|
|
d3drm_viewport2_GetField,
|
|
|
|
d3drm_viewport2_GetBack,
|
|
|
|
d3drm_viewport2_GetFront,
|
|
|
|
d3drm_viewport2_GetProjection,
|
|
|
|
d3drm_viewport2_GetDirect3DViewport,
|
|
|
|
d3drm_viewport2_TransformVectors,
|
|
|
|
d3drm_viewport2_InverseTransformVectors,
|
2012-01-17 23:00:50 +01:00
|
|
|
};
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
HRESULT Direct3DRMViewport_create(REFIID riid, IUnknown **out)
|
2012-01-17 23:00:17 +01:00
|
|
|
{
|
2013-11-01 09:41:02 +01:00
|
|
|
struct d3drm_viewport *object;
|
2012-01-17 23:00:17 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
TRACE("riid %s, out %p.\n", debugstr_guid(riid), out);
|
2012-01-17 23:00:17 +01:00
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
2012-01-17 23:00:17 +01:00
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
2013-11-01 09:41:02 +01:00
|
|
|
object->IDirect3DRMViewport_iface.lpVtbl = &d3drm_viewport1_vtbl;
|
|
|
|
object->IDirect3DRMViewport2_iface.lpVtbl = &d3drm_viewport2_vtbl;
|
2016-03-03 09:10:21 +01:00
|
|
|
d3drm_object_init(&object->obj);
|
2012-01-17 23:00:17 +01:00
|
|
|
|
2012-01-17 23:00:50 +01:00
|
|
|
if (IsEqualGUID(riid, &IID_IDirect3DRMViewport2))
|
2013-11-01 09:41:02 +01:00
|
|
|
*out = (IUnknown *)&object->IDirect3DRMViewport2_iface;
|
2012-01-17 23:00:50 +01:00
|
|
|
else
|
2013-11-01 09:41:02 +01:00
|
|
|
*out = (IUnknown *)&object->IDirect3DRMViewport_iface;
|
2012-01-17 23:00:17 +01:00
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|