Commit 6341389f authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Get rid of IDirect3DIndexBuffer9Impl.

parent 503b1639
......@@ -216,25 +216,18 @@ HRESULT vertexbuffer_init(struct d3d9_vertexbuffer *buffer, struct d3d9_device *
UINT size, UINT usage, DWORD fvf, D3DPOOL pool) DECLSPEC_HIDDEN;
struct d3d9_vertexbuffer *unsafe_impl_from_IDirect3DVertexBuffer9(IDirect3DVertexBuffer9 *iface) DECLSPEC_HIDDEN;
/* --------------------- */
/* IDirect3DIndexBuffer9 */
/* --------------------- */
/*****************************************************************************
* IDirect3DIndexBuffer9 implementation structure
*/
typedef struct IDirect3DIndexBuffer9Impl
struct d3d9_indexbuffer
{
IDirect3DIndexBuffer9 IDirect3DIndexBuffer9_iface;
LONG ref;
struct wined3d_buffer *wineD3DIndexBuffer;
IDirect3DDevice9Ex *parentDevice;
LONG refcount;
struct wined3d_buffer *wined3d_buffer;
IDirect3DDevice9Ex *parent_device;
enum wined3d_format_id format;
} IDirect3DIndexBuffer9Impl;
};
HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, struct d3d9_device *device,
HRESULT indexbuffer_init(struct d3d9_indexbuffer *buffer, struct d3d9_device *device,
UINT size, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
IDirect3DIndexBuffer9Impl *unsafe_impl_from_IDirect3DIndexBuffer9(IDirect3DIndexBuffer9 *iface) DECLSPEC_HIDDEN;
struct d3d9_indexbuffer *unsafe_impl_from_IDirect3DIndexBuffer9(IDirect3DIndexBuffer9 *iface) DECLSPEC_HIDDEN;
struct d3d9_texture
{
......
......@@ -831,7 +831,7 @@ static HRESULT WINAPI d3d9_device_CreateIndexBuffer(IDirect3DDevice9Ex *iface, U
HANDLE *shared_handle)
{
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
IDirect3DIndexBuffer9Impl *object;
struct d3d9_indexbuffer *object;
HRESULT hr;
TRACE("iface %p, size %u, usage %#x, format %#x, pool %#x, buffer %p, shared_handle %p.\n",
......@@ -2497,14 +2497,14 @@ static HRESULT WINAPI d3d9_device_GetStreamSourceFreq(IDirect3DDevice9Ex *iface,
static HRESULT WINAPI d3d9_device_SetIndices(IDirect3DDevice9Ex *iface, IDirect3DIndexBuffer9 *buffer)
{
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
IDirect3DIndexBuffer9Impl *ib = unsafe_impl_from_IDirect3DIndexBuffer9(buffer);
struct d3d9_indexbuffer *ib = unsafe_impl_from_IDirect3DIndexBuffer9(buffer);
HRESULT hr;
TRACE("iface %p, buffer %p.\n", iface, buffer);
wined3d_mutex_lock();
hr = wined3d_device_set_index_buffer(device->wined3d_device,
ib ? ib->wineD3DIndexBuffer : NULL,
ib ? ib->wined3d_buffer : NULL,
ib ? ib->format : WINED3DFMT_UNKNOWN);
wined3d_mutex_unlock();
......@@ -2515,7 +2515,7 @@ static HRESULT WINAPI d3d9_device_GetIndices(IDirect3DDevice9Ex *iface, IDirect3
{
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
struct wined3d_buffer *retIndexData = NULL;
IDirect3DIndexBuffer9Impl *buffer_impl;
struct d3d9_indexbuffer *buffer_impl;
HRESULT hr;
TRACE("iface %p, buffer %p.\n", iface, buffer);
......
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