Commit 860c0eb2 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d10core: Implement d3d10_device_IAGetVertexBuffers().

parent d0d213f7
......@@ -527,8 +527,31 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetInputLayout(ID3D10Device *iface,
static void STDMETHODCALLTYPE d3d10_device_IAGetVertexBuffers(ID3D10Device *iface,
UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers, UINT *strides, UINT *offsets)
{
FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p stub!\n",
struct d3d10_device *device = impl_from_ID3D10Device(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p.\n",
iface, start_slot, buffer_count, buffers, strides, offsets);
for (i = 0; i < buffer_count; ++i)
{
struct wined3d_buffer *wined3d_buffer;
struct d3d10_buffer *buffer_impl;
if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, start_slot + i,
&wined3d_buffer, &offsets[i], &strides[i])))
ERR("Failed to get vertex buffer.\n");
if (!wined3d_buffer)
{
buffers[i] = NULL;
continue;
}
buffer_impl = wined3d_buffer_get_parent(wined3d_buffer);
buffers[i] = &buffer_impl->ID3D10Buffer_iface;
ID3D10Buffer_AddRef(buffers[i]);
}
}
static void STDMETHODCALLTYPE d3d10_device_IAGetIndexBuffer(ID3D10Device *iface,
......
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