Commit d7768739 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ddraw: COM cleanup for the IDirect3DVertexBuffer7 iface.

parent 60223057
......@@ -4956,7 +4956,7 @@ static HRESULT WINAPI d3d7_CreateVertexBuffer(IDirect3D7 *iface, D3DVERTEXBUFFER
if (hr == D3D_OK)
{
TRACE("Created vertex buffer %p.\n", object);
*vertex_buffer = (IDirect3DVertexBuffer7 *)object;
*vertex_buffer = &object->IDirect3DVertexBuffer7_iface;
}
else
WARN("Failed to create vertex buffer, hr %#x.\n", hr);
......
......@@ -519,8 +519,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *execute_buffer,
*****************************************************************************/
struct IDirect3DVertexBufferImpl
{
/*** IUnknown Methods ***/
const IDirect3DVertexBuffer7Vtbl *lpVtbl;
IDirect3DVertexBuffer7 IDirect3DVertexBuffer7_iface;
IDirect3DVertexBuffer IDirect3DVertexBuffer_iface;
LONG ref;
......
......@@ -4132,7 +4132,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawPrimitiveVB(IDirect3DDevice3 *if
iface, PrimitiveType, D3DVertexBuf, StartVertex, NumVertices, Flags);
return IDirect3DDevice7_DrawPrimitiveVB((IDirect3DDevice7 *)device_from_device3(iface),
PrimitiveType, (IDirect3DVertexBuffer7 *)vb, StartVertex, NumVertices, Flags);
PrimitiveType, &vb->IDirect3DVertexBuffer7_iface, StartVertex, NumVertices, Flags);
}
......@@ -4294,7 +4294,8 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawIndexedPrimitiveVB(IDirect3DDevi
iface, PrimitiveType, D3DVertexBuf, Indices, IndexCount, Flags);
return IDirect3DDevice7_DrawIndexedPrimitiveVB((IDirect3DDevice7 *)device_from_device3(iface),
PrimitiveType, (IDirect3DVertexBuffer7 *)vb, 0, IndexCount, Indices, IndexCount, Flags);
PrimitiveType, &vb->IDirect3DVertexBuffer7_iface, 0, IndexCount, Indices, IndexCount,
Flags);
}
/*****************************************************************************
......
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