[PATCH 4/5] d3dx9_36: Implemented ID3DXConstantTable_SetMatrix and ID3DXConstantTable_SetMatrixArray

Matteo Bruni matteo.mystral at gmail.com
Thu Jan 20 09:27:48 CST 2011


2011/1/20 Travis Athougies <iammisc at gmail.com>:
> +            /* D3DXMATRIX is a union, one of whose elements is an array, so it can be cast to a float pointer */
> +           if (is_vertex_shader(This->desc.Version))
> +               IDirect3DDevice9_SetVertexShaderConstantF(device, desc.RegisterIndex + i, (float *)(matrix + i),
> +                        desc.RegisterCount);
> +           else
> +               IDirect3DDevice9_SetPixelShaderConstantF(device, desc.RegisterIndex + i, (float *)(matrix + i),
> +                        desc.RegisterCount);

Can't you just pass matrix->m[i] as parameter, instead of that cast?




More information about the wine-devel mailing list