wined3d: Rename IWineD3DDevice::SetIndices() to IWineD3DDevice::SetIndexBuffer().

This commit is contained in:
Henri Verbeet 2009-09-25 13:31:45 +02:00 committed by Alexandre Julliard
parent f88c6e5ce5
commit 60e32659a7
8 changed files with 17 additions and 14 deletions

View File

@ -215,7 +215,7 @@ static void STDMETHODCALLTYPE d3d10_device_IASetIndexBuffer(ID3D10Device *iface,
TRACE("iface %p, buffer %p, format %s, offset %u.\n",
iface, buffer, debug_dxgi_format(format), offset);
IWineD3DDevice_SetIndices(This->wined3d_device, buffer ? ((struct d3d10_buffer *)buffer)->wined3d_buffer : NULL,
IWineD3DDevice_SetIndexBuffer(This->wined3d_device, buffer ? ((struct d3d10_buffer *)buffer)->wined3d_buffer : NULL,
wined3dformat_from_dxgi_format(format));
if (offset) FIXME("offset %u not supported.\n", offset);
}

View File

@ -2060,7 +2060,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetIndices(LPDIRECT3DDEVICE8 iface, I
*/
wined3d_mutex_lock();
IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, baseVertexIndex);
hr = IWineD3DDevice_SetIndices(This->WineD3DDevice,
hr = IWineD3DDevice_SetIndexBuffer(This->WineD3DDevice,
ib ? ib->wineD3DIndexBuffer : NULL,
ib ? ib->format : WINED3DFMT_UNKNOWN);
wined3d_mutex_unlock();

View File

@ -508,7 +508,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_Reset(LPDIRECT3DDEVICE9EX iface, D3
* below fails, the device is considered "lost", and _Reset and _Release are the only allowed calls
*/
wined3d_mutex_lock();
IWineD3DDevice_SetIndices(This->WineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
IWineD3DDevice_SetIndexBuffer(This->WineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
for(i = 0; i < 16; i++) {
IWineD3DDevice_SetStreamSource(This->WineD3DDevice, i, NULL, 0, 0);
}
@ -1934,7 +1934,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetIndices(LPDIRECT3DDEVICE9EX ifac
TRACE("(%p) Relay\n", This);
wined3d_mutex_lock();
hr = IWineD3DDevice_SetIndices(This->WineD3DDevice,
hr = IWineD3DDevice_SetIndexBuffer(This->WineD3DDevice,
ib ? ib->wineD3DIndexBuffer : NULL,
ib ? ib->format : WINED3DFMT_UNKNOWN);
wined3d_mutex_unlock();

View File

@ -316,7 +316,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
EnterCriticalSection(&ddraw_cs);
/* Free the index buffer. */
IWineD3DDevice_SetIndices(This->wineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
IWineD3DDevice_SetIndexBuffer(This->wineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
IWineD3DBuffer_GetParent(This->indexbuffer,
(IUnknown **) &IndexBufferParent);
IParent_Release(IndexBufferParent); /* Once for the getParent */
@ -4266,7 +4266,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
/* Set the index stream */
IWineD3DDevice_SetBaseVertexIndex(This->wineD3DDevice, StartVertex);
hr = IWineD3DDevice_SetIndices(This->wineD3DDevice, This->indexbuffer,
hr = IWineD3DDevice_SetIndexBuffer(This->wineD3DDevice, This->indexbuffer,
WINED3DFMT_R16_UINT);
/* Set the vertex stream source */

View File

@ -317,7 +317,7 @@ IDirectDrawSurfaceImpl_Release(IDirectDrawSurface7 *iface)
TRACE("(%p) Destroying the render target, uninitializing D3D\n", This);
/* Unset any index buffer, just to be sure */
IWineD3DDevice_SetIndices(ddraw->wineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
IWineD3DDevice_SetIndexBuffer(ddraw->wineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
IWineD3DDevice_SetDepthStencilSurface(ddraw->wineD3DDevice, NULL);
IWineD3DDevice_SetVertexDeclaration(ddraw->wineD3DDevice, NULL);
for(i = 0; i < ddraw->numConvertedDecls; i++)

View File

@ -3064,8 +3064,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetMaterial(IWineD3DDevice *iface, WINE
/*****
* Get / Set Indices
*****/
static HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWineD3DBuffer* pIndexData, WINED3DFORMAT fmt) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
static HRESULT WINAPI IWineD3DDeviceImpl_SetIndexBuffer(IWineD3DDevice *iface,
IWineD3DBuffer *pIndexData, WINED3DFORMAT fmt)
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DBuffer *oldIdxs;
TRACE("(%p) : Setting to %p\n", This, pIndexData);
@ -7393,7 +7395,7 @@ const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
IWineD3DDeviceImpl_GetDepthStencilSurface,
IWineD3DDeviceImpl_SetGammaRamp,
IWineD3DDeviceImpl_GetGammaRamp,
IWineD3DDeviceImpl_SetIndices,
IWineD3DDeviceImpl_SetIndexBuffer,
IWineD3DDeviceImpl_GetIndices,
IWineD3DDeviceImpl_SetBaseVertexIndex,
IWineD3DDeviceImpl_GetBaseVertexIndex,

View File

@ -842,8 +842,9 @@ should really perform a delta so that only the changes get updated*/
This->wineD3DDevice->updateStateBlock->gl_primitive_type = This->gl_primitive_type;
}
if (This->changed.indices) {
IWineD3DDevice_SetIndices(pDevice, This->pIndexData, This->IndexFmt);
if (This->changed.indices)
{
IWineD3DDevice_SetIndexBuffer(pDevice, This->pIndexData, This->IndexFmt);
IWineD3DDevice_SetBaseVertexIndex(pDevice, This->baseVertexIndex);
}
@ -1025,7 +1026,7 @@ should really perform a delta so that only the changes get updated*/
IWineD3DDevice_SetTransform(pDevice, i, &This->transforms[i]);
}
This->wineD3DDevice->updateStateBlock->gl_primitive_type = This->gl_primitive_type;
IWineD3DDevice_SetIndices(pDevice, This->pIndexData, This->IndexFmt);
IWineD3DDevice_SetIndexBuffer(pDevice, This->pIndexData, This->IndexFmt);
IWineD3DDevice_SetBaseVertexIndex(pDevice, This->baseVertexIndex);
IWineD3DDevice_SetVertexDeclaration(pDevice, This->vertexDecl);
IWineD3DDevice_SetMaterial(pDevice, &This->material);

View File

@ -3118,7 +3118,7 @@ interface IWineD3DDevice : IWineD3DBase
[in] UINT swapchain_idx,
[out] WINED3DGAMMARAMP *ramp
);
HRESULT SetIndices(
HRESULT SetIndexBuffer(
[in] IWineD3DBuffer *index_buffer,
[in] WINED3DFORMAT format
);