directx.c revision 058c0c53c37f5cb271aeb3c385c10766f84f4aef
/*
* IDirect3D9 implementation
*
* Copyright 2002 Jason Edmeades
* Copyright 2005 Oliver Stieber
*
* 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 "config.h"
#include "d3d9_private.h"
{
}
{
{
return S_OK;
}
{
{
WARN("Application asks for IDirect3D9Ex, but this instance wasn't created with Direct3DCreate9Ex.\n");
return E_NOINTERFACE;
}
return S_OK;
}
return E_NOINTERFACE;
}
{
return refcount;
}
{
if (!refcount)
{
}
return refcount;
}
{
return hr;
}
{
return ret;
}
{
struct wined3d_adapter_identifier adapter_id;
TRACE("iface %p, adapter %u, flags %#x, identifier %p.\n",
memcpy(&identifier->DeviceIdentifier, &adapter_id.device_identifier, sizeof(identifier->DeviceIdentifier));
return hr;
}
{
/* Others than that not supported by d3d9, but reported by wined3d for ddraw. Filter them out. */
return 0;
return ret;
}
{
struct wined3d_display_mode wined3d_mode;
TRACE("iface %p, adapter %u, format %#x, mode_idx %u, mode %p.\n",
return D3DERR_INVALIDCALL;
{
}
return hr;
}
static HRESULT WINAPI d3d9_GetAdapterDisplayMode(IDirect3D9Ex *iface, UINT adapter, D3DDISPLAYMODE *mode)
{
struct wined3d_display_mode wined3d_mode;
{
}
return hr;
}
static HRESULT WINAPI d3d9_CheckDeviceType(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type,
{
TRACE("iface %p, adapter %u, device_type %#x, display_format %#x, backbuffer_format %#x, windowed %#x.\n",
hr = wined3d_check_device_type(d3d9->wined3d, adapter, device_type, wined3dformat_from_d3dformat(display_format),
return hr;
}
static HRESULT WINAPI d3d9_CheckDeviceFormat(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type,
{
TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.\n",
switch (resource_type)
{
case D3DRTYPE_VERTEXBUFFER:
case D3DRTYPE_INDEXBUFFER:
break;
default:
break;
}
hr = wined3d_check_device_format(d3d9->wined3d, adapter, device_type, wined3dformat_from_d3dformat(adapter_format),
return hr;
}
static HRESULT WINAPI d3d9_CheckDeviceMultiSampleType(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type,
{
TRACE("iface %p, adapter %u, device_type %#x, format %#x, windowed %#x, multisample_type %#x, levels %p.\n",
return hr;
}
static HRESULT WINAPI d3d9_CheckDepthStencilMatch(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type,
{
TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, rt_format %#x, ds_format %#x.\n",
return hr;
}
{
TRACE("iface %p, adapter %u, device_type %#x, src_format %#x, dst_format %#x.\n",
return hr;
}
{
pCaps->RasterCaps &=
pCaps->TextureCaps &=
else
{
}
else
{
}
}
static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type, D3DCAPS9 *caps)
{
if (!caps)
return D3DERR_INVALIDCALL;
return D3DERR_INVALIDCALL; /*well this is what MSDN says to return*/
/* Some functionality is implemented in d3d9.dll, not wined3d.dll. Add the needed caps */
return hr;
}
{
return ret;
}
{
struct d3d9_device *object;
TRACE("iface %p, adapter %u, device_type %#x, focus_window %p, flags %#x, parameters %p, device %p.\n",
if (!object)
return E_OUTOFMEMORY;
#ifdef VBOX_WITH_WDDM
#endif
parameters, NULL);
{
return hr;
}
return D3D_OK;
}
{
return 0;
return ret;
}
{
struct wined3d_display_mode wined3d_mode;
TRACE("iface %p, adapter %u, filter %p, mode_idx %u, mode %p.\n",
return D3DERR_INVALIDCALL;
hr = wined3d_enum_adapter_modes(d3d9->wined3d, adapter, wined3dformat_from_d3dformat(filter->Format),
{
}
return hr;
}
{
struct wined3d_display_mode wined3d_mode;
TRACE("iface %p, adapter %u, mode %p, rotation %p.\n",
return D3DERR_INVALIDCALL;
(enum wined3d_display_rotation *)rotation);
{
}
return hr;
}
{
struct d3d9_device *object;
TRACE("iface %p, adapter %u, device_type %#x, focus_window %p, flags %#x, parameters %p, mode %p, device %p.\n",
if (!object)
return E_OUTOFMEMORY;
#ifdef VBOX_WITH_WDDM
#endif
parameters, mode);
{
return hr;
}
return D3D_OK;
}
{
struct wined3d_adapter_identifier adapter_id;
adapter_id.driver_size = 0;
return hr;
}
static const struct IDirect3D9ExVtbl d3d9_vtbl =
{
/* IUnknown */
/* IDirect3D9 */
/* IDirect3D9Ex */
};
{
return FALSE;
return TRUE;
}