Commit 27ca37db authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d8: Get rid of IDirect3DIndexBuffer8Impl.

parent 9b085a92
...@@ -100,7 +100,6 @@ ...@@ -100,7 +100,6 @@
void fixup_caps(WINED3DCAPS *pWineCaps) DECLSPEC_HIDDEN; void fixup_caps(WINED3DCAPS *pWineCaps) DECLSPEC_HIDDEN;
typedef struct IDirect3DIndexBuffer8Impl IDirect3DIndexBuffer8Impl;
typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl; typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl;
typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl; typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl;
typedef struct IDirect3DVolume8Impl IDirect3DVolume8Impl; typedef struct IDirect3DVolume8Impl IDirect3DVolume8Impl;
...@@ -256,25 +255,18 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, struct d3d8_device ...@@ -256,25 +255,18 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, struct d3d8_device
UINT size, DWORD usage, DWORD fvf, D3DPOOL pool) DECLSPEC_HIDDEN; UINT size, DWORD usage, DWORD fvf, D3DPOOL pool) DECLSPEC_HIDDEN;
IDirect3DVertexBuffer8Impl *unsafe_impl_from_IDirect3DVertexBuffer8(IDirect3DVertexBuffer8 *iface) DECLSPEC_HIDDEN; IDirect3DVertexBuffer8Impl *unsafe_impl_from_IDirect3DVertexBuffer8(IDirect3DVertexBuffer8 *iface) DECLSPEC_HIDDEN;
/* --------------------- */ struct d3d8_indexbuffer
/* IDirect3DIndexBuffer8 */
/* --------------------- */
/*****************************************************************************
* IDirect3DIndexBuffer8 implementation structure
*/
struct IDirect3DIndexBuffer8Impl
{ {
IDirect3DIndexBuffer8 IDirect3DIndexBuffer8_iface; IDirect3DIndexBuffer8 IDirect3DIndexBuffer8_iface;
LONG ref; LONG refcount;
struct wined3d_buffer *wineD3DIndexBuffer; struct wined3d_buffer *wined3d_buffer;
IDirect3DDevice8 *parentDevice; IDirect3DDevice8 *parent_device;
enum wined3d_format_id format; enum wined3d_format_id format;
}; };
HRESULT indexbuffer_init(IDirect3DIndexBuffer8Impl *buffer, struct d3d8_device *device, HRESULT indexbuffer_init(struct d3d8_indexbuffer *buffer, struct d3d8_device *device,
UINT size, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN; UINT size, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
IDirect3DIndexBuffer8Impl *unsafe_impl_from_IDirect3DIndexBuffer8(IDirect3DIndexBuffer8 *iface) DECLSPEC_HIDDEN; struct d3d8_indexbuffer *unsafe_impl_from_IDirect3DIndexBuffer8(IDirect3DIndexBuffer8 *iface) DECLSPEC_HIDDEN;
struct d3d8_texture struct d3d8_texture
{ {
......
...@@ -804,7 +804,7 @@ static HRESULT WINAPI d3d8_device_CreateIndexBuffer(IDirect3DDevice8 *iface, UIN ...@@ -804,7 +804,7 @@ static HRESULT WINAPI d3d8_device_CreateIndexBuffer(IDirect3DDevice8 *iface, UIN
DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer8 **buffer) DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer8 **buffer)
{ {
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
IDirect3DIndexBuffer8Impl *object; struct d3d8_indexbuffer *object;
HRESULT hr; HRESULT hr;
TRACE("iface %p, size %u, usage %#x, format %#x, pool %#x, buffer %p.\n", TRACE("iface %p, size %u, usage %#x, format %#x, pool %#x, buffer %p.\n",
...@@ -2325,7 +2325,7 @@ static HRESULT WINAPI d3d8_device_SetIndices(IDirect3DDevice8 *iface, ...@@ -2325,7 +2325,7 @@ static HRESULT WINAPI d3d8_device_SetIndices(IDirect3DDevice8 *iface,
IDirect3DIndexBuffer8 *buffer, UINT base_vertex_idx) IDirect3DIndexBuffer8 *buffer, UINT base_vertex_idx)
{ {
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
IDirect3DIndexBuffer8Impl *ib = unsafe_impl_from_IDirect3DIndexBuffer8(buffer); struct d3d8_indexbuffer *ib = unsafe_impl_from_IDirect3DIndexBuffer8(buffer);
HRESULT hr; HRESULT hr;
TRACE("iface %p, buffer %p, base_vertex_idx %u.\n", iface, buffer, base_vertex_idx); TRACE("iface %p, buffer %p, base_vertex_idx %u.\n", iface, buffer, base_vertex_idx);
...@@ -2339,7 +2339,7 @@ static HRESULT WINAPI d3d8_device_SetIndices(IDirect3DDevice8 *iface, ...@@ -2339,7 +2339,7 @@ static HRESULT WINAPI d3d8_device_SetIndices(IDirect3DDevice8 *iface,
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_device_set_base_vertex_index(device->wined3d_device, base_vertex_idx); wined3d_device_set_base_vertex_index(device->wined3d_device, base_vertex_idx);
hr = wined3d_device_set_index_buffer(device->wined3d_device, hr = wined3d_device_set_index_buffer(device->wined3d_device,
ib ? ib->wineD3DIndexBuffer : NULL, ib ? ib->wined3d_buffer : NULL,
ib ? ib->format : WINED3DFMT_UNKNOWN); ib ? ib->format : WINED3DFMT_UNKNOWN);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
...@@ -2351,7 +2351,7 @@ static HRESULT WINAPI d3d8_device_GetIndices(IDirect3DDevice8 *iface, ...@@ -2351,7 +2351,7 @@ static HRESULT WINAPI d3d8_device_GetIndices(IDirect3DDevice8 *iface,
{ {
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
struct wined3d_buffer *wined3d_buffer = NULL; struct wined3d_buffer *wined3d_buffer = NULL;
IDirect3DIndexBuffer8Impl *buffer_impl; struct d3d8_indexbuffer *buffer_impl;
HRESULT hr; HRESULT hr;
TRACE("iface %p, buffer %p, base_vertex_index %p.\n", iface, buffer, base_vertex_index); TRACE("iface %p, buffer %p, base_vertex_index %p.\n", iface, buffer, base_vertex_index);
......
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