d3dx9: Implement ID3DXBaseEffect::SetFloatArray().

This commit is contained in:
Rico Schüller 2011-11-24 22:36:25 +01:00 committed by Alexandre Julliard
parent db6cf95a24
commit d3ed67434e
1 changed files with 32 additions and 2 deletions

View File

@ -1838,10 +1838,40 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_GetFloat(ID3DXBaseEffect *iface, D3DXH
static HRESULT WINAPI ID3DXBaseEffectImpl_SetFloatArray(ID3DXBaseEffect *iface, D3DXHANDLE parameter, CONST FLOAT *f, UINT count)
{
struct ID3DXBaseEffectImpl *This = impl_from_ID3DXBaseEffect(iface);
struct d3dx_parameter *param = get_valid_parameter(This, parameter);
FIXME("iface %p, parameter %p, f %p, count %u stub\n", This, parameter, f, count);
TRACE("iface %p, parameter %p, f %p, count %u\n", This, parameter, f, count);
return E_NOTIMPL;
if (param)
{
UINT i, size = min(count, param->bytes / sizeof(DWORD));
TRACE("Class %s\n", debug_d3dxparameter_class(param->class));
switch (param->class)
{
case D3DXPC_SCALAR:
case D3DXPC_VECTOR:
case D3DXPC_MATRIX_ROWS:
for (i = 0; i < size; ++i)
{
set_number((DWORD *)param->data + i, param->type, &f[i], D3DXPT_FLOAT);
}
return D3D_OK;
case D3DXPC_OBJECT:
case D3DXPC_STRUCT:
break;
default:
FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
break;
}
}
WARN("Invalid argument specified\n");
return D3DERR_INVALIDCALL;
}
static HRESULT WINAPI ID3DXBaseEffectImpl_GetFloatArray(ID3DXBaseEffect *iface, D3DXHANDLE parameter, FLOAT *f, UINT count)