ddraw: Send device2_Draw* through device3_Draw*.
This commit is contained in:
parent
05de3f8cee
commit
669611b4be
|
@ -2189,43 +2189,6 @@ static HRESULT WINAPI d3d_device2_Index(IDirect3DDevice2 *iface, WORD index)
|
|||
return d3d_device3_Index(&device->IDirect3DDevice3_iface, index);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* IDirect3DDevice3::End
|
||||
*
|
||||
* Ends a draw begun with IDirect3DDevice3::Begin or
|
||||
* IDirect3DDevice::BeginIndexed. The vertices specified with
|
||||
* IDirect3DDevice::Vertex or IDirect3DDevice::Index are drawn using
|
||||
* the IDirect3DDevice7::DrawPrimitive method. So far only
|
||||
* non-indexed mode is supported
|
||||
*
|
||||
* Version 2 and 3
|
||||
*
|
||||
* Params:
|
||||
* Flags: Some flags, as usual. Don't know which are defined
|
||||
*
|
||||
* Returns:
|
||||
* The return value of IDirect3DDevice7::DrawPrimitive
|
||||
*
|
||||
*****************************************************************************/
|
||||
static HRESULT WINAPI d3d_device3_End(IDirect3DDevice3 *iface, DWORD flags)
|
||||
{
|
||||
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
|
||||
|
||||
TRACE("iface %p, flags %#x.\n", iface, flags);
|
||||
|
||||
return IDirect3DDevice7_DrawPrimitive(&device->IDirect3DDevice7_iface, device->primitive_type,
|
||||
device->vertex_type, device->sysmem_vertex_buffer, device->nb_vertices, device->render_flags);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3d_device2_End(IDirect3DDevice2 *iface, DWORD flags)
|
||||
{
|
||||
struct d3d_device *device = impl_from_IDirect3DDevice2(iface);
|
||||
|
||||
TRACE("iface %p, flags %#x.\n", iface, flags);
|
||||
|
||||
return d3d_device3_End(&device->IDirect3DDevice3_iface, flags);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* IDirect3DDevice7::GetRenderState
|
||||
*
|
||||
|
@ -3545,7 +3508,7 @@ static HRESULT WINAPI d3d_device2_DrawPrimitive(IDirect3DDevice2 *iface,
|
|||
return DDERR_INVALIDPARAMS; /* Should never happen */
|
||||
}
|
||||
|
||||
return IDirect3DDevice7_DrawPrimitive(&device->IDirect3DDevice7_iface,
|
||||
return d3d_device3_DrawPrimitive(&device->IDirect3DDevice3_iface,
|
||||
primitive_type, fvf, vertices, vertex_count, flags);
|
||||
}
|
||||
|
||||
|
@ -3728,10 +3691,47 @@ static HRESULT WINAPI d3d_device2_DrawIndexedPrimitive(IDirect3DDevice2 *iface,
|
|||
return DDERR_INVALIDPARAMS; /* Should never happen */
|
||||
}
|
||||
|
||||
return IDirect3DDevice7_DrawIndexedPrimitive(&device->IDirect3DDevice7_iface,
|
||||
return d3d_device3_DrawIndexedPrimitive(&device->IDirect3DDevice3_iface,
|
||||
primitive_type, fvf, vertices, vertex_count, indices, index_count, flags);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* IDirect3DDevice3::End
|
||||
*
|
||||
* Ends a draw begun with IDirect3DDevice3::Begin or
|
||||
* IDirect3DDevice::BeginIndexed. The vertices specified with
|
||||
* IDirect3DDevice::Vertex or IDirect3DDevice::Index are drawn using
|
||||
* the IDirect3DDevice3::DrawPrimitive method. So far only
|
||||
* non-indexed mode is supported
|
||||
*
|
||||
* Version 2 and 3
|
||||
*
|
||||
* Params:
|
||||
* Flags: Some flags, as usual. Don't know which are defined
|
||||
*
|
||||
* Returns:
|
||||
* The return value of IDirect3DDevice3::DrawPrimitive
|
||||
*
|
||||
*****************************************************************************/
|
||||
static HRESULT WINAPI d3d_device3_End(IDirect3DDevice3 *iface, DWORD flags)
|
||||
{
|
||||
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
|
||||
|
||||
TRACE("iface %p, flags %#x.\n", iface, flags);
|
||||
|
||||
return d3d_device3_DrawPrimitive(&device->IDirect3DDevice3_iface, device->primitive_type,
|
||||
device->vertex_type, device->sysmem_vertex_buffer, device->nb_vertices, device->render_flags);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3d_device2_End(IDirect3DDevice2 *iface, DWORD flags)
|
||||
{
|
||||
struct d3d_device *device = impl_from_IDirect3DDevice2(iface);
|
||||
|
||||
TRACE("iface %p, flags %#x.\n", iface, flags);
|
||||
|
||||
return d3d_device3_End(&device->IDirect3DDevice3_iface, flags);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* IDirect3DDevice7::SetClipStatus
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue