d3d10: Add an initial implementation of D3D10CreateDevice().

This commit is contained in:
Henri Verbeet 2008-10-21 15:06:58 +02:00 committed by Alexandre Julliard
parent b2d20154fa
commit 39cd9f7448
3 changed files with 28 additions and 1 deletions

View File

@ -1,7 +1,7 @@
@ stub D3D10CompileEffectFromMemory
@ stub D3D10CompileShader
@ stub D3D10CreateBlob
@ stub D3D10CreateDevice
@ stdcall D3D10CreateDevice(ptr long ptr long long ptr)
@ stub D3D10CreateDeviceAndSwapChain
@ stub D3D10CreateEffectFromMemory
@ stub D3D10CreateEffectPoolFromMemory

View File

@ -40,3 +40,27 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
}
return TRUE;
}
HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type,
HMODULE swrast, UINT flags, UINT sdk_version, ID3D10Device **device)
{
struct d3d10_device *object;
FIXME("adapter %p, driver_type %s, swrast %p, flags %#x, sdk_version %d, device %p partial stub!\n",
adapter, debug_d3d10_driver_type(driver_type), swrast, flags, sdk_version, device);
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
{
ERR("Failed to allocate D3D device object memory\n");
return E_OUTOFMEMORY;
}
object->vtbl = &d3d10_device_vtbl;
object->refcount = 1;
*device = (ID3D10Device *)object;
TRACE("Created ID3D10Device %p\n", object);
return S_OK;
}

View File

@ -32,6 +32,9 @@ typedef enum D3D10_DRIVER_TYPE {
D3D10_DRIVER_TYPE_SOFTWARE = 3,
} D3D10_DRIVER_TYPE;
HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type,
HMODULE swrast, UINT flags, UINT sdk_version, ID3D10Device **device);
#ifdef __cplusplus
}
#endif