d3dx9_36: Implemented ID3DXConstantTable_SetVector and ID3DXConstantTable_SetVectorArray.
This commit is contained in:
parent
73272d1664
commit
9c138a182a
|
@ -934,24 +934,50 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetFloatArray(ID3DXConstantTable *i
|
|||
return set_float_array(iface, device, constant, f, count, D3DXPT_FLOAT);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ID3DXConstantTableImpl_SetVector(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device,
|
||||
D3DXHANDLE constant, CONST D3DXVECTOR4* vector)
|
||||
static HRESULT WINAPI ID3DXConstantTableImpl_SetVector(ID3DXConstantTable *iface, LPDIRECT3DDEVICE9 device,
|
||||
D3DXHANDLE constant, CONST D3DXVECTOR4 *vector)
|
||||
{
|
||||
ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface);
|
||||
|
||||
FIXME("(%p)->(%p, %p, %p): stub\n", This, device, constant, vector);
|
||||
TRACE("(%p)->(%p, %p, %p)\n", This, device, constant, vector);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return ID3DXConstantTable_SetVectorArray(iface, device, constant, vector, 1);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ID3DXConstantTableImpl_SetVectorArray(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device,
|
||||
D3DXHANDLE constant, CONST D3DXVECTOR4* vector, UINT count)
|
||||
static HRESULT WINAPI ID3DXConstantTableImpl_SetVectorArray(ID3DXConstantTable *iface, LPDIRECT3DDEVICE9 device,
|
||||
D3DXHANDLE constant, CONST D3DXVECTOR4 *vector, UINT count)
|
||||
{
|
||||
ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface);
|
||||
|
||||
FIXME("(%p)->(%p, %p, %p, %d): stub\n", This, device, constant, vector, count);
|
||||
D3DXCONSTANT_DESC desc;
|
||||
HRESULT hr;
|
||||
UINT desc_count = 1;
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("(%p)->(%p, %p, %p, %d)\n", This, device, constant, vector, count);
|
||||
|
||||
hr = ID3DXConstantTable_GetConstantDesc(iface, constant, &desc, &desc_count);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
TRACE("ID3DXConstantTable_GetConstantDesc failed: %08x", hr);
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
switch (desc.RegisterSet)
|
||||
{
|
||||
case D3DXRS_FLOAT4:
|
||||
if (is_vertex_shader(This->desc.Version))
|
||||
IDirect3DDevice9_SetVertexShaderConstantF(device, desc.RegisterIndex, (float *)vector,
|
||||
min(desc.RegisterCount, count));
|
||||
else
|
||||
IDirect3DDevice9_SetPixelShaderConstantF(device, desc.RegisterIndex, (float *)vector,
|
||||
min(desc.RegisterCount, count));
|
||||
break;
|
||||
default:
|
||||
FIXME("Handle other register sets\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrix(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device,
|
||||
|
|
Loading…
Reference in New Issue