Commit 8d4ca1f8 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Remove COM from the device implementation.

parent 979e3744
......@@ -75,7 +75,7 @@ struct d3d10_device
IUnknown *outer_unknown;
LONG refcount;
IWineD3DDevice *wined3d_device;
struct wined3d_device *wined3d_device;
};
void d3d10_device_init(struct d3d10_device *device, void *outer_unknown) DECLSPEC_HIDDEN;
......
......@@ -77,7 +77,8 @@ static ULONG STDMETHODCALLTYPE d3d10_device_inner_Release(IUnknown *iface)
if (!refcount)
{
if (This->wined3d_device) IWineD3DDevice_Release(This->wined3d_device);
if (This->wined3d_device)
wined3d_device_decref(This->wined3d_device);
}
return refcount;
......@@ -158,7 +159,7 @@ static void STDMETHODCALLTYPE d3d10_device_DrawIndexed(ID3D10Device *iface,
iface, index_count, start_index_location, base_vertex_location);
wined3d_device_set_base_vertex_index(This->wined3d_device, base_vertex_location);
IWineD3DDevice_DrawIndexedPrimitive(This->wined3d_device, start_index_location, index_count);
wined3d_device_draw_indexed_primitive(This->wined3d_device, start_index_location, index_count);
}
static void STDMETHODCALLTYPE d3d10_device_Draw(ID3D10Device *iface,
......@@ -169,7 +170,7 @@ static void STDMETHODCALLTYPE d3d10_device_Draw(ID3D10Device *iface,
TRACE("iface %p, vertex_count %u, start_vertex_location %u\n",
iface, vertex_count, start_vertex_location);
IWineD3DDevice_DrawPrimitive(This->wined3d_device, start_vertex_location, vertex_count);
wined3d_device_draw_primitive(This->wined3d_device, start_vertex_location, vertex_count);
}
static void STDMETHODCALLTYPE d3d10_device_PSSetConstantBuffers(ID3D10Device *iface,
......@@ -259,7 +260,7 @@ static void STDMETHODCALLTYPE d3d10_device_IASetPrimitiveTopology(ID3D10Device *
TRACE("iface %p, topology %s\n", iface, debug_d3d10_primitive_topology(topology));
IWineD3DDevice_SetPrimitiveType(This->wined3d_device, (WINED3DPRIMITIVETYPE)topology);
wined3d_device_set_primitive_type(This->wined3d_device, (WINED3DPRIMITIVETYPE)topology);
}
static void STDMETHODCALLTYPE d3d10_device_VSSetShaderResources(ID3D10Device *iface,
......@@ -380,7 +381,7 @@ static void STDMETHODCALLTYPE d3d10_device_ClearRenderTargetView(ID3D10Device *i
iface, render_target_view, color_rgba[0], color_rgba[1], color_rgba[2], color_rgba[3]);
wined3d_view = ((struct d3d10_rendertarget_view *)render_target_view)->wined3d_view;
IWineD3DDevice_ClearRendertargetView(This->wined3d_device, wined3d_view, &color);
wined3d_device_clear_rendertarget_view(This->wined3d_device, wined3d_view, &color);
}
static void STDMETHODCALLTYPE d3d10_device_ClearDepthStencilView(ID3D10Device *iface,
......@@ -479,7 +480,7 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetPrimitiveTopology(ID3D10Device *
TRACE("iface %p, topology %p\n", iface, topology);
IWineD3DDevice_GetPrimitiveType(This->wined3d_device, (WINED3DPRIMITIVETYPE *)topology);
wined3d_device_get_primitive_type(This->wined3d_device, (WINED3DPRIMITIVETYPE *)topology);
}
static void STDMETHODCALLTYPE d3d10_device_VSGetShaderResources(ID3D10Device *iface,
......@@ -1311,13 +1312,14 @@ static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface
/* IWineD3DDeviceParent methods */
static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceParent *iface, IWineD3DDevice *device)
static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceParent *iface,
struct wined3d_device *device)
{
struct d3d10_device *This = device_from_device_parent(iface);
TRACE("iface %p, device %p\n", iface, device);
IWineD3DDevice_AddRef(device);
wined3d_device_incref(device);
This->wined3d_device = device;
}
......
......@@ -270,7 +270,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im
buffer->fvf = fvf;
wined3d_mutex_lock();
hr = wined3d_buffer_create_vb(device->WineD3DDevice, size, usage & WINED3DUSAGE_MASK,
hr = wined3d_buffer_create_vb(device->wined3d_device, size, usage & WINED3DUSAGE_MASK,
(WINED3DPOOL)pool, buffer, &d3d8_vertexbuffer_wined3d_parent_ops, &buffer->wineD3DVertexBuffer);
wined3d_mutex_unlock();
if (FAILED(hr))
......@@ -533,7 +533,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer8Impl *buffer, IDirect3DDevice8Impl
buffer->format = wined3dformat_from_d3dformat(format);
wined3d_mutex_lock();
hr = wined3d_buffer_create_ib(device->WineD3DDevice, size, usage & WINED3DUSAGE_MASK,
hr = wined3d_buffer_create_ib(device->wined3d_device, size, usage & WINED3DUSAGE_MASK,
(WINED3DPOOL)pool, buffer, &d3d8_indexbuffer_wined3d_parent_ops, &buffer->wineD3DIndexBuffer);
wined3d_mutex_unlock();
if (FAILED(hr))
......
......@@ -425,7 +425,7 @@ HRESULT cubetexture_init(IDirect3DCubeTexture8Impl *texture, IDirect3DDevice8Imp
texture->ref = 1;
wined3d_mutex_lock();
hr = wined3d_texture_create_cube(device->WineD3DDevice, edge_length, levels,
hr = wined3d_texture_create_cube(device->wined3d_device, edge_length, levels,
usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture,
&d3d8_cubetexture_wined3d_parent_ops, &texture->wined3d_texture);
wined3d_mutex_unlock();
......
......@@ -177,8 +177,7 @@ struct IDirect3DDevice8Impl
IDirect3DDevice8 IDirect3DDevice8_iface;
IWineD3DDeviceParent IWineD3DDeviceParent_iface;
LONG ref;
/* But what about baseVertexIndex in state blocks? hmm... it may be a better idea to pass this to wined3d */
IWineD3DDevice *WineD3DDevice;
struct wined3d_device *wined3d_device;
struct d3d8_handle_table handle_table;
/* FVF management */
......
......@@ -176,7 +176,7 @@ HRESULT vertexshader_init(IDirect3DVertexShader8Impl *shader, IDirect3DDevice8Im
if (usage) FIXME("Usage %#x not implemented.\n", usage);
wined3d_mutex_lock();
hr = wined3d_shader_create_vs(device->WineD3DDevice, byte_code, NULL /* output signature */,
hr = wined3d_shader_create_vs(device->wined3d_device, byte_code, NULL /* output signature */,
shader, &d3d8_vertexshader_wined3d_parent_ops, &shader->wined3d_shader);
wined3d_mutex_unlock();
if (FAILED(hr))
......@@ -277,7 +277,7 @@ HRESULT pixelshader_init(IDirect3DPixelShader8Impl *shader, IDirect3DDevice8Impl
shader->handle = shader_handle;
wined3d_mutex_lock();
hr = wined3d_shader_create_ps(device->WineD3DDevice, byte_code, NULL, shader,
hr = wined3d_shader_create_ps(device->wined3d_device, byte_code, NULL, shader,
&d3d8_pixelshader_wined3d_parent_ops, &shader->wined3d_shader);
wined3d_mutex_unlock();
if (FAILED(hr))
......
......@@ -304,7 +304,7 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, IDirect3DDevice8Impl *devic
}
wined3d_mutex_lock();
hr = wined3d_surface_create(device->WineD3DDevice, width, height, wined3dformat_from_d3dformat(format),
hr = wined3d_surface_create(device->wined3d_device, width, height, wined3dformat_from_d3dformat(format),
lockable, discard, level, usage & WINED3DUSAGE_MASK, (WINED3DPOOL)pool, multisample_type,
multisample_quality, SURFACE_OPENGL, surface, &d3d8_surface_wined3d_parent_ops, &surface->wined3d_surface);
wined3d_mutex_unlock();
......
......@@ -174,7 +174,7 @@ HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl
wined3d_parameters.AutoRestoreDisplayMode = TRUE;
wined3d_mutex_lock();
hr = wined3d_swapchain_create(device->WineD3DDevice, &wined3d_parameters,
hr = wined3d_swapchain_create(device->wined3d_device, &wined3d_parameters,
SURFACE_OPENGL, swapchain, &d3d8_swapchain_wined3d_parent_ops,
&swapchain->wined3d_swapchain);
wined3d_mutex_unlock();
......
......@@ -413,7 +413,7 @@ HRESULT texture_init(IDirect3DTexture8Impl *texture, IDirect3DDevice8Impl *devic
texture->ref = 1;
wined3d_mutex_lock();
hr = wined3d_texture_create_2d(device->WineD3DDevice, width, height, levels,
hr = wined3d_texture_create_2d(device->wined3d_device, width, height, levels,
usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool,
texture, &d3d8_texture_wined3d_parent_ops, &texture->wined3d_texture);
wined3d_mutex_unlock();
......
......@@ -400,7 +400,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration8Impl *declaration,
memcpy(declaration->elements, elements, declaration->elements_size);
wined3d_mutex_lock();
hr = wined3d_vertex_declaration_create(device->WineD3DDevice, wined3d_elements, wined3d_element_count,
hr = wined3d_vertex_declaration_create(device->wined3d_device, wined3d_elements, wined3d_element_count,
declaration, &d3d8_vertexdeclaration_wined3d_parent_ops, &declaration->wined3d_vertex_declaration);
wined3d_mutex_unlock();
HeapFree(GetProcessHeap(), 0, wined3d_elements);
......@@ -425,7 +425,7 @@ HRESULT vertexdeclaration_init_fvf(IDirect3DVertexDeclaration8Impl *declaration,
declaration->elements_size = 0;
declaration->shader_handle = fvf;
hr = wined3d_vertex_declaration_create_from_fvf(device->WineD3DDevice, fvf, declaration,
hr = wined3d_vertex_declaration_create_from_fvf(device->wined3d_device, fvf, declaration,
&d3d8_vertexdeclaration_wined3d_parent_ops, &declaration->wined3d_vertex_declaration);
if (FAILED(hr))
{
......
......@@ -277,7 +277,7 @@ HRESULT volume_init(IDirect3DVolume8Impl *volume, IDirect3DDevice8Impl *device,
volume->IDirect3DVolume8_iface.lpVtbl = &Direct3DVolume8_Vtbl;
volume->ref = 1;
hr = wined3d_volume_create(device->WineD3DDevice, width, height, depth, usage,
hr = wined3d_volume_create(device->wined3d_device, width, height, depth, usage,
format, pool, volume, &d3d8_volume_wined3d_parent_ops, &volume->wined3d_volume);
if (FAILED(hr))
{
......
......@@ -401,7 +401,7 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture8Impl *texture, IDirect3DDevice
texture->ref = 1;
wined3d_mutex_lock();
hr = wined3d_texture_create_3d(device->WineD3DDevice, width, height, depth, levels,
hr = wined3d_texture_create_3d(device->wined3d_device, width, height, depth, levels,
usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture,
&d3d8_volumetexture_wined3d_parent_ops, &texture->wined3d_texture);
wined3d_mutex_unlock();
......
......@@ -272,7 +272,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im
buffer->fvf = fvf;
wined3d_mutex_lock();
hr = wined3d_buffer_create_vb(device->WineD3DDevice, size, usage & WINED3DUSAGE_MASK,
hr = wined3d_buffer_create_vb(device->wined3d_device, size, usage & WINED3DUSAGE_MASK,
(WINED3DPOOL)pool, buffer, &d3d9_vertexbuffer_wined3d_parent_ops, &buffer->wineD3DVertexBuffer);
wined3d_mutex_unlock();
if (FAILED(hr))
......@@ -535,7 +535,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl
buffer->format = wined3dformat_from_d3dformat(format);
wined3d_mutex_lock();
hr = wined3d_buffer_create_ib(device->WineD3DDevice, size, usage & WINED3DUSAGE_MASK,
hr = wined3d_buffer_create_ib(device->wined3d_device, size, usage & WINED3DUSAGE_MASK,
(WINED3DPOOL)pool, buffer, &d3d9_indexbuffer_wined3d_parent_ops, &buffer->wineD3DIndexBuffer);
wined3d_mutex_unlock();
if (FAILED(hr))
......
......@@ -470,7 +470,7 @@ HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Imp
texture->ref = 1;
wined3d_mutex_lock();
hr = wined3d_texture_create_cube(device->WineD3DDevice, edge_length,
hr = wined3d_texture_create_cube(device->wined3d_device, edge_length,
levels, usage, wined3dformat_from_d3dformat(format), pool, texture,
&d3d9_cubetexture_wined3d_parent_ops, &texture->wined3d_texture);
wined3d_mutex_unlock();
......
......@@ -165,7 +165,7 @@ typedef struct IDirect3DDevice9Impl
IDirect3DDevice9Ex IDirect3DDevice9Ex_iface;
const IWineD3DDeviceParentVtbl *device_parent_vtbl;
LONG ref;
IWineD3DDevice *WineD3DDevice;
struct wined3d_device *wined3d_device;
/* Avoids recursion with nested ReleaseRef to 0 */
BOOL inDestruction;
......
......@@ -171,7 +171,7 @@ HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, D3D
query->ref = 1;
wined3d_mutex_lock();
hr = wined3d_query_create(device->WineD3DDevice, type, &query->wineD3DQuery);
hr = wined3d_query_create(device->wined3d_device, type, &query->wineD3DQuery);
wined3d_mutex_unlock();
if (FAILED(hr))
{
......
......@@ -135,7 +135,7 @@ HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader, IDirect3DDevice9Im
shader->lpVtbl = &d3d9_vertexshader_vtbl;
wined3d_mutex_lock();
hr = wined3d_shader_create_vs(device->WineD3DDevice, byte_code, NULL,
hr = wined3d_shader_create_vs(device->wined3d_device, byte_code, NULL,
shader, &d3d9_vertexshader_wined3d_parent_ops, &shader->wined3d_shader);
wined3d_mutex_unlock();
if (FAILED(hr))
......@@ -262,7 +262,7 @@ HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader, IDirect3DDevice9Impl
shader->lpVtbl = &d3d9_pixelshader_vtbl;
wined3d_mutex_lock();
hr = wined3d_shader_create_ps(device->WineD3DDevice, byte_code, NULL, shader,
hr = wined3d_shader_create_ps(device->wined3d_device, byte_code, NULL, shader,
&d3d9_pixelshader_wined3d_parent_ops, &shader->wined3d_shader);
wined3d_mutex_unlock();
if (FAILED(hr))
......
......@@ -149,7 +149,7 @@ HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Im
else
{
wined3d_mutex_lock();
hr = wined3d_stateblock_create(device->WineD3DDevice,
hr = wined3d_stateblock_create(device->wined3d_device,
(WINED3DSTATEBLOCKTYPE)type, &stateblock->wined3d_stateblock);
wined3d_mutex_unlock();
if (FAILED(hr))
......
......@@ -392,7 +392,7 @@ HRESULT surface_init(IDirect3DSurface9Impl *surface, IDirect3DDevice9Impl *devic
}
wined3d_mutex_lock();
hr = wined3d_surface_create(device->WineD3DDevice, width, height, wined3dformat_from_d3dformat(format),
hr = wined3d_surface_create(device->wined3d_device, width, height, wined3dformat_from_d3dformat(format),
lockable, discard, level, usage & WINED3DUSAGE_MASK, (WINED3DPOOL)pool, multisample_type,
multisample_quality, SURFACE_OPENGL, surface, &d3d9_surface_wined3d_parent_ops, &surface->wined3d_surface);
wined3d_mutex_unlock();
......
......@@ -259,7 +259,7 @@ HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl
wined3d_parameters.AutoRestoreDisplayMode = TRUE;
wined3d_mutex_lock();
hr = wined3d_swapchain_create(device->WineD3DDevice, &wined3d_parameters,
hr = wined3d_swapchain_create(device->wined3d_device, &wined3d_parameters,
SURFACE_OPENGL, swapchain, &d3d9_swapchain_wined3d_parent_ops,
&swapchain->wined3d_swapchain);
wined3d_mutex_unlock();
......
......@@ -457,7 +457,7 @@ HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *devic
texture->ref = 1;
wined3d_mutex_lock();
hr = wined3d_texture_create_2d(device->WineD3DDevice, width, height, levels,
hr = wined3d_texture_create_2d(device->wined3d_device, width, height, levels,
usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool,
texture, &d3d9_texture_wined3d_parent_ops, &texture->wined3d_texture);
wined3d_mutex_unlock();
......
......@@ -395,7 +395,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration,
declaration->element_count = element_count;
wined3d_mutex_lock();
hr = wined3d_vertex_declaration_create(device->WineD3DDevice, wined3d_elements, wined3d_element_count,
hr = wined3d_vertex_declaration_create(device->wined3d_device, wined3d_elements, wined3d_element_count,
declaration, &d3d9_vertexdeclaration_wined3d_parent_ops, &declaration->wineD3DVertexDeclaration);
wined3d_mutex_unlock();
HeapFree(GetProcessHeap(), 0, wined3d_elements);
......
......@@ -275,7 +275,7 @@ HRESULT volume_init(IDirect3DVolume9Impl *volume, IDirect3DDevice9Impl *device,
volume->IDirect3DVolume9_iface.lpVtbl = &Direct3DVolume9_Vtbl;
volume->ref = 1;
hr = wined3d_volume_create(device->WineD3DDevice, width, height, depth, usage & WINED3DUSAGE_MASK,
hr = wined3d_volume_create(device->wined3d_device, width, height, depth, usage & WINED3DUSAGE_MASK,
format, pool, volume, &d3d9_volume_wined3d_parent_ops, &volume->wined3d_volume);
if (FAILED(hr))
{
......
......@@ -443,7 +443,7 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice
texture->ref = 1;
wined3d_mutex_lock();
hr = wined3d_texture_create_3d(device->WineD3DDevice, width, height, depth, levels,
hr = wined3d_texture_create_3d(device->wined3d_device, width, height, depth, levels,
usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture,
&d3d9_volumetexture_wined3d_parent_ops, &texture->wined3d_texture);
wined3d_mutex_unlock();
......
......@@ -85,7 +85,7 @@ struct IDirectDrawImpl
/* WineD3D linkage */
struct wined3d *wineD3D;
IWineD3DDevice *wineD3DDevice;
struct wined3d_device *wined3d_device;
BOOL d3d_initialized;
/* Misc ddraw fields */
......@@ -285,7 +285,7 @@ struct IDirect3DDeviceImpl
LONG ref;
/* Other object connections */
IWineD3DDevice *wineD3DDevice;
struct wined3d_device *wined3d_device;
IDirectDrawImpl *ddraw;
struct wined3d_buffer *indexbuffer;
IDirectDrawSurfaceImpl *target;
......
......@@ -156,7 +156,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
/* IDirect3DDevices have color keying always enabled -
* enable it before drawing. This overwrites any ALPHA*
* render state. */
wined3d_device_set_render_state(lpDevice->wineD3DDevice, WINED3DRS_COLORKEYENABLE, 1);
wined3d_device_set_render_state(lpDevice->wined3d_device, WINED3DRS_COLORKEYENABLE, 1);
IDirect3DDevice7_DrawIndexedPrimitive((IDirect3DDevice7 *)lpDevice,
D3DPT_TRIANGLELIST, D3DFVF_TLVERTEX, tl_vx, 0, This->indices, count * 3, 0);
} break;
......@@ -315,11 +315,11 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
/* Get the transform and world matrix */
/* Note: D3DMATRIX is compatible with WINED3DMATRIX */
wined3d_device_get_transform(lpDevice->wineD3DDevice,
wined3d_device_get_transform(lpDevice->wined3d_device,
D3DTRANSFORMSTATE_VIEW, (WINED3DMATRIX *)&view_mat);
wined3d_device_get_transform(lpDevice->wineD3DDevice,
wined3d_device_get_transform(lpDevice->wined3d_device,
D3DTRANSFORMSTATE_PROJECTION, (WINED3DMATRIX *)&proj_mat);
wined3d_device_get_transform(lpDevice->wineD3DDevice,
wined3d_device_get_transform(lpDevice->wined3d_device,
WINED3DTS_WORLDMATRIX(0), (WINED3DMATRIX *)&world_mat);
for (i = 0; i < count; i++) {
......
......@@ -266,7 +266,7 @@ HRESULT ddraw_palette_init(IDirectDrawPaletteImpl *palette,
palette->lpVtbl = &ddraw_palette_vtbl;
palette->ref = 1;
hr = wined3d_palette_create(ddraw->wineD3DDevice, flags,
hr = wined3d_palette_create(ddraw->wined3d_device, flags,
entries, palette, &palette->wineD3DPalette);
if (FAILED(hr))
{
......
......@@ -275,7 +275,7 @@ static void ddraw_surface_cleanup(IDirectDrawSurfaceImpl *surface)
HeapFree(GetProcessHeap(), 0, ddraw->decls);
ddraw->numConvertedDecls = 0;
if (FAILED(IWineD3DDevice_Uninit3D(ddraw->wineD3DDevice)))
if (FAILED(wined3d_device_uninit_3d(ddraw->wined3d_device)))
{
ERR("Failed to uninit 3D.\n");
}
......@@ -295,7 +295,7 @@ static void ddraw_surface_cleanup(IDirectDrawSurfaceImpl *surface)
}
else
{
IWineD3DDevice_UninitGDI(ddraw->wineD3DDevice);
wined3d_device_uninit_gdi(ddraw->wined3d_device);
}
surface->wined3d_swapchain = NULL;
......@@ -2923,7 +2923,7 @@ static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp(IDirectDrawGammaControl *
if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
{
/* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP. */
wined3d_device_get_gamma_ramp(surface->ddraw->wineD3DDevice, 0, (WINED3DGAMMARAMP *)gamma_ramp);
wined3d_device_get_gamma_ramp(surface->ddraw->wined3d_device, 0, (WINED3DGAMMARAMP *)gamma_ramp);
}
else
{
......@@ -2965,7 +2965,7 @@ static HRESULT WINAPI ddraw_gamma_control_SetGammaRamp(IDirectDrawGammaControl *
if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
{
/* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP */
wined3d_device_set_gamma_ramp(surface->ddraw->wineD3DDevice, 0, flags, (WINED3DGAMMARAMP *)gamma_ramp);
wined3d_device_set_gamma_ramp(surface->ddraw->wined3d_device, 0, flags, (WINED3DGAMMARAMP *)gamma_ramp);
}
else
{
......@@ -3483,10 +3483,10 @@ HRESULT ddraw_surface_create_texture(IDirectDrawSurfaceImpl *surface)
format = PixelFormat_DD2WineD3D(&surface->surface_desc.u4.ddpfPixelFormat);
if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
return wined3d_texture_create_cube(surface->ddraw->wineD3DDevice, desc->dwWidth,
return wined3d_texture_create_cube(surface->ddraw->wined3d_device, desc->dwWidth,
levels, 0, format, pool, surface, &ddraw_texture_wined3d_parent_ops, &surface->wined3d_texture);
else
return wined3d_texture_create_2d(surface->ddraw->wineD3DDevice, desc->dwWidth, desc->dwHeight,
return wined3d_texture_create_2d(surface->ddraw->wined3d_device, desc->dwWidth, desc->dwHeight,
levels, 0, format, pool, surface, &ddraw_texture_wined3d_parent_ops, &surface->wined3d_texture);
}
......@@ -3572,7 +3572,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
surface->first_attached = surface;
surface->ImplType = surface_type;
hr = wined3d_surface_create(ddraw->wineD3DDevice, desc->dwWidth, desc->dwHeight, format,
hr = wined3d_surface_create(ddraw->wined3d_device, desc->dwWidth, desc->dwHeight, format,
TRUE /* Lockable */, FALSE /* Discard */, mip_level, usage, pool,
WINED3DMULTISAMPLE_NONE, 0 /* MultiSampleQuality */, surface_type, surface,
&ddraw_surface_wined3d_parent_ops, &surface->wined3d_surface);
......
......@@ -145,10 +145,10 @@ IDirect3DVertexBufferImpl_Release(IDirect3DVertexBuffer7 *iface)
* as a parameter to drawPrimitiveVB. DrawPrimitiveVB sets them as the
* stream source in wined3d, and they should get unset there before
* they are destroyed. */
wined3d_device_get_stream_source(This->ddraw->wineD3DDevice,
wined3d_device_get_stream_source(This->ddraw->wined3d_device,
0, &curVB, &offset, &stride);
if (curVB == This->wineD3DVertexBuffer)
wined3d_device_set_stream_source(This->ddraw->wineD3DDevice, 0, NULL, 0, 0);
wined3d_device_set_stream_source(This->ddraw->wined3d_device, 0, NULL, 0, 0);
if (curVB)
wined3d_buffer_decref(curVB); /* For the GetStreamSource */
......@@ -326,25 +326,19 @@ IDirect3DVertexBufferImpl_ProcessVertices(IDirect3DVertexBuffer7 *iface,
* the vertex ops
*/
doClip = VertexOp & D3DVOP_CLIP ? TRUE : FALSE;
wined3d_device_get_render_state(D3D->wineD3DDevice, WINED3DRS_CLIPPING, (DWORD *)&oldClip);
wined3d_device_get_render_state(D3D->wined3d_device, WINED3DRS_CLIPPING, (DWORD *)&oldClip);
if (doClip != oldClip)
wined3d_device_set_render_state(D3D->wineD3DDevice, WINED3DRS_CLIPPING, doClip);
wined3d_device_set_render_state(D3D->wined3d_device, WINED3DRS_CLIPPING, doClip);
wined3d_device_set_stream_source(D3D->wineD3DDevice,
wined3d_device_set_stream_source(D3D->wined3d_device,
0, Src->wineD3DVertexBuffer, 0, get_flexible_vertex_size(Src->fvf));
wined3d_device_set_vertex_declaration(D3D->wineD3DDevice, Src->wineD3DVertexDeclaration);
hr = IWineD3DDevice_ProcessVertices(D3D->wineD3DDevice,
SrcIndex,
DestIndex,
Count,
This->wineD3DVertexBuffer,
NULL /* Output vdecl */,
Flags,
This->fvf);
wined3d_device_set_vertex_declaration(D3D->wined3d_device, Src->wineD3DVertexDeclaration);
hr = wined3d_device_process_vertices(D3D->wined3d_device, SrcIndex, DestIndex,
Count, This->wineD3DVertexBuffer, NULL, Flags, This->fvf);
/* Restore the states if needed */
if (doClip != oldClip)
wined3d_device_set_render_state(D3D->wineD3DDevice, WINED3DRS_CLIPPING, oldClip);
wined3d_device_set_render_state(D3D->wined3d_device, WINED3DRS_CLIPPING, oldClip);
LeaveCriticalSection(&ddraw_cs);
return hr;
}
......@@ -551,7 +545,7 @@ HRESULT d3d_vertex_buffer_init(IDirect3DVertexBufferImpl *buffer,
EnterCriticalSection(&ddraw_cs);
hr = wined3d_buffer_create_vb(ddraw->wineD3DDevice,
hr = wined3d_buffer_create_vb(ddraw->wined3d_device,
get_flexible_vertex_size(desc->dwFVF) * desc->dwNumVertices,
usage, desc->dwCaps & D3DVBCAPS_SYSTEMMEMORY ? WINED3DPOOL_SYSTEMMEM : WINED3DPOOL_DEFAULT,
buffer, &ddraw_null_wined3d_parent_ops, &buffer->wineD3DVertexBuffer);
......
......@@ -387,11 +387,11 @@ IDirect3DViewportImpl_TransformVertices(IDirect3DViewport3 *iface,
EnterCriticalSection(&ddraw_cs);
wined3d_device_get_transform(This->active_device->wineD3DDevice,
wined3d_device_get_transform(This->active_device->wined3d_device,
D3DTRANSFORMSTATE_VIEW, (WINED3DMATRIX *)&view_mat);
wined3d_device_get_transform(This->active_device->wineD3DDevice,
wined3d_device_get_transform(This->active_device->wined3d_device,
D3DTRANSFORMSTATE_PROJECTION, (WINED3DMATRIX *)&proj_mat);
wined3d_device_get_transform(This->active_device->wineD3DDevice,
wined3d_device_get_transform(This->active_device->wined3d_device,
WINED3DTS_WORLDMATRIX(0), (WINED3DMATRIX *)&world_mat);
multiply_matrix(&mat,&view_mat,&world_mat);
multiply_matrix(&mat,&proj_mat,&mat);
......
......@@ -75,7 +75,7 @@ static ULONG STDMETHODCALLTYPE dxgi_device_Release(IWineDXGIDevice *iface)
{
if (This->child_layer) IUnknown_Release(This->child_layer);
EnterCriticalSection(&dxgi_cs);
IWineD3DDevice_Release(This->wined3d_device);
wined3d_device_decref(This->wined3d_device);
LeaveCriticalSection(&dxgi_cs);
IWineDXGIFactory_Release(This->factory);
HeapFree(GetProcessHeap(), 0, This);
......@@ -142,7 +142,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetAdapter(IWineDXGIDevice *iface,
EnterCriticalSection(&dxgi_cs);
hr = IWineD3DDevice_GetCreationParameters(This->wined3d_device, &create_parameters);
hr = wined3d_device_get_creation_parameters(This->wined3d_device, &create_parameters);
if (FAILED(hr))
{
LeaveCriticalSection(&dxgi_cs);
......@@ -239,14 +239,14 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetGPUThreadPriority(IWineDXGIDevic
/* IWineDXGIDevice methods */
static IWineD3DDevice * STDMETHODCALLTYPE dxgi_device_get_wined3d_device(IWineDXGIDevice *iface)
static struct wined3d_device * STDMETHODCALLTYPE dxgi_device_get_wined3d_device(IWineDXGIDevice *iface)
{
struct dxgi_device *This = (struct dxgi_device *)iface;
TRACE("iface %p\n", iface);
EnterCriticalSection(&dxgi_cs);
IWineD3DDevice_AddRef(This->wined3d_device);
wined3d_device_incref(This->wined3d_device);
LeaveCriticalSection(&dxgi_cs);
return This->wined3d_device;
}
......@@ -403,7 +403,7 @@ fail:
if (device->wined3d_device)
{
EnterCriticalSection(&dxgi_cs);
IWineD3DDevice_Release(device->wined3d_device);
wined3d_device_decref(device->wined3d_device);
LeaveCriticalSection(&dxgi_cs);
}
if (device->factory) IWineDXGIFactory_Release(device->factory);
......
......@@ -92,7 +92,7 @@ struct dxgi_device
const struct IWineDXGIDeviceVtbl *vtbl;
IUnknown *child_layer;
LONG refcount;
IWineD3DDevice *wined3d_device;
struct wined3d_device *wined3d_device;
IWineDXGIFactory *factory;
};
......
......@@ -163,7 +163,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IWineDXGIFactory *
{
WINED3DPRESENT_PARAMETERS present_parameters;
struct wined3d_swapchain *wined3d_swapchain;
IWineD3DDevice *wined3d_device;
struct wined3d_device *wined3d_device;
IWineDXGIDevice *dxgi_device;
UINT count;
HRESULT hr;
......@@ -180,11 +180,11 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IWineDXGIFactory *
wined3d_device = IWineDXGIDevice_get_wined3d_device(dxgi_device);
IWineDXGIDevice_Release(dxgi_device);
count = IWineD3DDevice_GetNumberOfSwapChains(wined3d_device);
count = wined3d_device_get_swapchain_count(wined3d_device);
if (count)
{
FIXME("Only a single swapchain supported.\n");
IWineD3DDevice_Release(wined3d_device);
wined3d_device_decref(wined3d_device);
return E_FAIL;
}
......@@ -219,16 +219,16 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IWineDXGIFactory *
desc->BufferDesc.RefreshRate.Numerator / desc->BufferDesc.RefreshRate.Denominator;
present_parameters.PresentationInterval = WINED3DPRESENT_INTERVAL_DEFAULT;
hr = IWineD3DDevice_Init3D(wined3d_device, &present_parameters);
hr = wined3d_device_init_3d(wined3d_device, &present_parameters);
if (FAILED(hr))
{
WARN("Failed to initialize 3D, returning %#x\n", hr);
IWineD3DDevice_Release(wined3d_device);
wined3d_device_decref(wined3d_device);
return hr;
}
hr = IWineD3DDevice_GetSwapChain(wined3d_device, 0, &wined3d_swapchain);
IWineD3DDevice_Release(wined3d_device);
hr = wined3d_device_get_swapchain(wined3d_device, 0, &wined3d_swapchain);
wined3d_device_decref(wined3d_device);
if (FAILED(hr))
{
WARN("Failed to get swapchain, returning %#x\n", hr);
......
......@@ -68,13 +68,13 @@ static ULONG STDMETHODCALLTYPE dxgi_swapchain_Release(IDXGISwapChain *iface)
if (!refcount)
{
IWineD3DDevice *wined3d_device;
struct wined3d_device *wined3d_device;
HRESULT hr;
FIXME("Only a single swapchain is supported\n");
wined3d_device = wined3d_swapchain_get_device(This->wined3d_swapchain);
hr = IWineD3DDevice_Uninit3D(wined3d_device);
hr = wined3d_device_uninit_3d(wined3d_device);
if (FAILED(hr))
{
ERR("Uninit3D failed, hr %#x\n", hr);
......
......@@ -693,7 +693,7 @@ static void context_queue_fbo_entry_destruction(struct wined3d_context *context,
list_add_head(&context->fbo_destroy_list, &entry->entry);
}
void context_resource_released(struct IWineD3DDeviceImpl *device,
void context_resource_released(struct wined3d_device *device,
struct wined3d_resource *resource, WINED3DRESOURCETYPE type)
{
if (!device->d3d_initialized) return;
......@@ -715,7 +715,7 @@ static void context_detach_fbo_entry(struct wined3d_context *context, struct fbo
entry->attached = FALSE;
}
void context_resource_unloaded(struct IWineD3DDeviceImpl *device,
void context_resource_unloaded(struct wined3d_device *device,
struct wined3d_resource *resource, WINED3DRESOURCETYPE type)
{
switch (type)
......
......@@ -112,7 +112,7 @@ HRESULT resource_init(struct wined3d_resource *resource, IWineD3DDeviceImpl *dev
/* Check that we have enough video ram left */
if (pool == WINED3DPOOL_DEFAULT)
{
if (size > IWineD3DDevice_GetAvailableTextureMem((IWineD3DDevice *)device))
if (size > wined3d_device_get_available_texture_mem(device))
{
ERR("Out of adapter memory\n");
HeapFree(GetProcessHeap(), 0, resource->heapMemory);
......
......@@ -1287,7 +1287,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
}
/* check the return values, because the GetBackBuffer call isn't valid for ddraw */
hr = IWineD3DDevice_GetSwapChain((IWineD3DDevice *)device, 0, &swapchain);
hr = wined3d_device_get_swapchain(device, 0, &swapchain);
if (SUCCEEDED(hr) && swapchain)
{
hr = wined3d_swapchain_get_back_buffer(swapchain, 0, WINED3DBACKBUFFER_TYPE_MONO, &backbuffer);
......
......@@ -78,7 +78,7 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain)
mode.Height = swapchain->orig_height;
mode.RefreshRate = 0;
mode.Format = swapchain->orig_fmt;
IWineD3DDevice_SetDisplayMode((IWineD3DDevice *)swapchain->device, 0, &mode);
wined3d_device_set_display_mode(swapchain->device, 0, &mode);
}
if (swapchain->backup_dc)
......@@ -571,7 +571,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
{
TRACE("Clearing the color buffer with cyan color\n");
IWineD3DDevice_Clear((IWineD3DDevice *)swapchain->device, 0, NULL,
wined3d_device_clear(swapchain->device, 0, NULL,
WINED3DCLEAR_TARGET, 0xff00ffff, 1.0f, 0);
}
......@@ -927,7 +927,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTY
mode.Format = present_parameters->BackBufferFormat;
mode.RefreshRate = present_parameters->FullScreen_RefreshRateInHz;
hr = IWineD3DDevice_SetDisplayMode((IWineD3DDevice *)device, 0, &mode);
hr = wined3d_device_set_display_mode(device, 0, &mode);
if (FAILED(hr))
{
WARN("Failed to set display mode, hr %#x.\n", hr);
......
......@@ -44,12 +44,38 @@
@ cdecl wined3d_clipper_set_clip_list(ptr ptr long)
@ cdecl wined3d_clipper_set_window(ptr long ptr)
@ cdecl wined3d_device_acquire_focus_window(ptr ptr)
@ cdecl wined3d_device_begin_scene(ptr)
@ cdecl wined3d_device_begin_stateblock(ptr)
@ cdecl wined3d_device_clear(ptr long ptr long long float long)
@ cdecl wined3d_device_clear_rendertarget_view(ptr ptr ptr)
@ cdecl wined3d_device_color_fill(ptr ptr ptr ptr)
@ cdecl wined3d_device_create(ptr long long ptr long ptr ptr)
@ cdecl wined3d_device_decref(ptr)
@ cdecl wined3d_device_delete_patch(ptr long)
@ cdecl wined3d_device_draw_indexed_primitive(ptr long long)
@ cdecl wined3d_device_draw_indexed_primitive_strided(ptr long ptr long ptr long)
@ cdecl wined3d_device_draw_indexed_primitive_up(ptr long ptr long ptr long)
@ cdecl wined3d_device_draw_primitive(ptr long long)
@ cdecl wined3d_device_draw_primitive_strided(ptr long ptr)
@ cdecl wined3d_device_draw_primitive_up(ptr long ptr long)
@ cdecl wined3d_device_draw_rect_patch(ptr long ptr ptr)
@ cdecl wined3d_device_draw_tri_patch(ptr long ptr ptr)
@ cdecl wined3d_device_end_scene(ptr)
@ cdecl wined3d_device_end_stateblock(ptr ptr)
@ cdecl wined3d_device_enum_resources(ptr ptr ptr)
@ cdecl wined3d_device_evict_managed_resources(ptr)
@ cdecl wined3d_device_get_available_texture_mem(ptr)
@ cdecl wined3d_device_get_back_buffer(ptr long long long ptr)
@ cdecl wined3d_device_get_base_vertex_index(ptr)
@ cdecl wined3d_device_get_clip_plane(ptr long ptr)
@ cdecl wined3d_device_get_clip_status(ptr ptr)
@ cdecl wined3d_device_get_creation_parameters(ptr ptr)
@ cdecl wined3d_device_get_current_texture_palette(ptr ptr)
@ cdecl wined3d_device_get_depth_stencil(ptr ptr)
@ cdecl wined3d_device_get_device_caps(ptr ptr)
@ cdecl wined3d_device_get_display_mode(ptr long ptr)
@ cdecl wined3d_device_get_front_buffer_data(ptr long ptr)
@ cdecl wined3d_device_get_gamma_ramp(ptr long ptr)
@ cdecl wined3d_device_get_index_buffer(ptr ptr)
@ cdecl wined3d_device_get_light(ptr long ptr)
......@@ -58,9 +84,11 @@
@ cdecl wined3d_device_get_npatch_mode(ptr)
@ cdecl wined3d_device_get_palette_entries(ptr long ptr)
@ cdecl wined3d_device_get_pixel_shader(ptr)
@ cdecl wined3d_device_get_primitive_type(ptr ptr)
@ cdecl wined3d_device_get_ps_consts_b(ptr long ptr long)
@ cdecl wined3d_device_get_ps_consts_f(ptr long ptr long)
@ cdecl wined3d_device_get_ps_consts_i(ptr long ptr long)
@ cdecl wined3d_device_get_raster_status(ptr long ptr)
@ cdecl wined3d_device_get_render_state(ptr long ptr)
@ cdecl wined3d_device_get_render_target(ptr long ptr)
@ cdecl wined3d_device_get_sampler_state(ptr long long ptr)
......@@ -68,6 +96,9 @@
@ cdecl wined3d_device_get_software_vertex_processing(ptr)
@ cdecl wined3d_device_get_stream_source(ptr long ptr ptr ptr)
@ cdecl wined3d_device_get_stream_source_freq(ptr long ptr)
@ cdecl wined3d_device_get_surface_from_dc(ptr ptr ptr)
@ cdecl wined3d_device_get_swapchain(ptr long ptr)
@ cdecl wined3d_device_get_swapchain_count(ptr)
@ cdecl wined3d_device_get_texture(ptr long ptr)
@ cdecl wined3d_device_get_texture_stage_state(ptr long long ptr)
@ cdecl wined3d_device_get_transform(ptr long ptr)
......@@ -77,19 +108,35 @@
@ cdecl wined3d_device_get_vs_consts_b(ptr long ptr long)
@ cdecl wined3d_device_get_vs_consts_f(ptr long ptr long)
@ cdecl wined3d_device_get_vs_consts_i(ptr long ptr long)
@ cdecl wined3d_device_get_wined3d(ptr ptr)
@ cdecl wined3d_device_incref(ptr)
@ cdecl wined3d_device_init_3d(ptr ptr)
@ cdecl wined3d_device_init_gdi(ptr ptr)
@ cdecl wined3d_device_multiply_transform(ptr long ptr)
@ cdecl wined3d_device_present(ptr ptr ptr ptr ptr)
@ cdecl wined3d_device_process_vertices(ptr long long long ptr ptr long long)
@ cdecl wined3d_device_release_focus_window(ptr)
@ cdecl wined3d_device_reset(ptr ptr)
@ cdecl wined3d_device_restore_fullscreen_window(ptr ptr)
@ cdecl wined3d_device_set_base_vertex_index(ptr long)
@ cdecl wined3d_device_set_clip_plane(ptr long ptr)
@ cdecl wined3d_device_set_clip_status(ptr ptr)
@ cdecl wined3d_device_set_current_texture_palette(ptr long)
@ cdecl wined3d_device_set_cursor_position(ptr long long long)
@ cdecl wined3d_device_set_cursor_properties(ptr long long ptr)
@ cdecl wined3d_device_set_depth_stencil(ptr ptr)
@ cdecl wined3d_device_set_dialog_box_mode(ptr long)
@ cdecl wined3d_device_set_display_mode(ptr long ptr)
@ cdecl wined3d_device_set_gamma_ramp(ptr long long ptr)
@ cdecl wined3d_device_set_index_buffer(ptr ptr long)
@ cdecl wined3d_device_set_light(ptr long ptr)
@ cdecl wined3d_device_set_light_enable(ptr long long)
@ cdecl wined3d_device_set_material(ptr ptr)
@ cdecl wined3d_device_set_multithreaded(ptr)
@ cdecl wined3d_device_set_npatch_mode(ptr float)
@ cdecl wined3d_device_set_palette_entries(ptr long ptr)
@ cdecl wined3d_device_set_pixel_shader(ptr ptr)
@ cdecl wined3d_device_set_primitive_type(ptr long)
@ cdecl wined3d_device_set_ps_consts_b(ptr long ptr long)
@ cdecl wined3d_device_set_ps_consts_f(ptr long ptr long)
@ cdecl wined3d_device_set_ps_consts_i(ptr long ptr long)
......@@ -109,6 +156,13 @@
@ cdecl wined3d_device_set_vs_consts_b(ptr long ptr long)
@ cdecl wined3d_device_set_vs_consts_f(ptr long ptr long)
@ cdecl wined3d_device_set_vs_consts_i(ptr long ptr long)
@ cdecl wined3d_device_setup_fullscreen_window(ptr ptr long long)
@ cdecl wined3d_device_show_cursor(ptr long)
@ cdecl wined3d_device_uninit_3d(ptr)
@ cdecl wined3d_device_uninit_gdi(ptr)
@ cdecl wined3d_device_update_surface(ptr ptr ptr ptr ptr)
@ cdecl wined3d_device_update_texture(ptr ptr ptr)
@ cdecl wined3d_device_validate_device(ptr ptr)
@ cdecl wined3d_palette_create(ptr long ptr ptr ptr)
@ cdecl wined3d_palette_decref(ptr)
......
......@@ -52,7 +52,8 @@
#define WINED3D_QUIRK_NV_CLIP_BROKEN 0x00000010
#define WINED3D_QUIRK_FBO_TEX_UPDATE 0x00000020
typedef struct IWineD3DDeviceImpl IWineD3DDeviceImpl;
typedef struct wined3d_device IWineD3DDeviceImpl;
typedef struct wined3d_device IWineD3DDevice;
/* Texture format fixups */
......@@ -1225,9 +1226,9 @@ void context_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPE
struct wined3d_context *context_get_current(void) DECLSPEC_HIDDEN;
DWORD context_get_tls_idx(void) DECLSPEC_HIDDEN;
void context_release(struct wined3d_context *context) DECLSPEC_HIDDEN;
void context_resource_released(struct IWineD3DDeviceImpl *device,
void context_resource_released(struct wined3d_device *device,
struct wined3d_resource *resource, WINED3DRESOURCETYPE type) DECLSPEC_HIDDEN;
void context_resource_unloaded(struct IWineD3DDeviceImpl *device,
void context_resource_unloaded(struct wined3d_device *device,
struct wined3d_resource *resource, WINED3DRESOURCETYPE type) DECLSPEC_HIDDEN;
BOOL context_set_current(struct wined3d_context *ctx) DECLSPEC_HIDDEN;
void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer) DECLSPEC_HIDDEN;
......@@ -1629,7 +1630,7 @@ struct wined3d
};
HRESULT wined3d_init(struct wined3d *wined3d, UINT version, void *parent) DECLSPEC_HIDDEN;
BOOL wined3d_register_window(HWND window, struct IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN;
BOOL wined3d_register_window(HWND window, struct wined3d_device *device) DECLSPEC_HIDDEN;
void wined3d_unregister_window(HWND window) DECLSPEC_HIDDEN;
/*****************************************************************************
......@@ -1640,11 +1641,9 @@ void wined3d_unregister_window(HWND window) DECLSPEC_HIDDEN;
/* Multithreaded flag. Removed from the public header to signal that IWineD3D::CreateDevice ignores it */
#define WINED3DCREATE_MULTITHREADED 0x00000004
struct IWineD3DDeviceImpl
struct wined3d_device
{
/* IUnknown fields */
const IWineD3DDeviceVtbl *lpVtbl;
LONG ref; /* Note: Ref counting not required */
LONG ref;
/* WineD3D Information */
IWineD3DDeviceParent *device_parent;
......@@ -1782,8 +1781,8 @@ HRESULT device_init(IWineD3DDeviceImpl *device, struct wined3d *wined3d,
void device_preload_textures(IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN;
LRESULT device_process_message(IWineD3DDeviceImpl *device, HWND window, BOOL unicode,
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
void device_resource_add(struct IWineD3DDeviceImpl *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct IWineD3DDeviceImpl *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup) DECLSPEC_HIDDEN;
void device_switch_onscreen_ds(IWineD3DDeviceImpl *device, struct wined3d_context *context,
......@@ -2631,7 +2630,7 @@ struct wined3d_shader
struct wined3d_shader_signature_element output_signature[MAX_REG_OUTPUT];
/* Pointer to the parent device */
struct IWineD3DDeviceImpl *device;
struct wined3d_device *device;
struct list shader_list_entry;
union
......
......@@ -45,7 +45,7 @@ interface IWineDXGIAdapter : IDXGIAdapter
]
interface IWineDXGIDevice : IDXGIDevice
{
struct IWineD3DDevice *get_wined3d_device();
struct wined3d_device *get_wined3d_device();
HRESULT create_surface(
[in] const DXGI_SURFACE_DESC *desc,
[in] DXGI_USAGE usage,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment