Henri Verbeet : d3d10core: Implement d3d10_device_IAGetVertexBuffers().
Alexandre Julliard
julliard at winehq.org
Wed Nov 21 14:45:15 CST 2012
Module: wine
Branch: master
Commit: 860c0eb24e5077458ef90113558531e8dd33852c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=860c0eb24e5077458ef90113558531e8dd33852c
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Nov 20 22:40:22 2012 +0100
d3d10core: Implement d3d10_device_IAGetVertexBuffers().
---
dlls/d3d10core/device.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c
index 2501da99..853c538 100644
--- a/dlls/d3d10core/device.c
+++ b/dlls/d3d10core/device.c
@@ -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,
More information about the wine-cvs
mailing list