Forwarding to the list.
Am 28.03.2011 20:47, schrieb David Laight:
Ints and floats are represented differently and so, if we want to put
an integer array into floating point registers, we need to have casts.
If you were to simply call SetFloatArray, you would get nonsense
values in the float
>> Ints and floats are represented differently and so, if we want to put
>> an integer array into floating point registers, we need to have casts.
>> If you were to simply call SetFloatArray, you would get nonsense
>> values in the floating point registers.
>
> Even using casts will fall foul of th
>
> Ints and floats are represented differently and so, if we want to put
> an integer array into floating point registers, we need to have casts.
> If you were to simply call SetFloatArray, you would get nonsense
> values in the floating point registers.
Even using casts will fall foul of the C
2011/3/28 Rico Schüller :
> Hi,
>
> this and the previous patch (1/5) are doing the same thing? Is there a
> reason why they could not use the same code base?
>
> e.g.
> ID3DXConstantTable_SetIntArray(iface, device, constant, n, count)
> {
> return ID3DXConstantTable_SetFloatArray(iface, device,
Hi,
this and the previous patch (1/5) are doing the same thing? Is there a
reason why they could not use the same code base?
e.g.
ID3DXConstantTable_SetIntArray(iface, device, constant, n, count)
{
return ID3DXConstantTable_SetFloatArray(iface, device, constant, n,
count);
}
Also I'd pr
2011/2/9 Travis Athougies :
>
> On Feb 8, 2011, at 4:10 AM, Matteo Bruni wrote:
>
>>> + /* We need the for loop, since we need to convert the integer to
>>> a float */
>>> + for (i = 0; i < count && i < desc.RegisterCount; i++)
>>> + {
>>> + row[0] = (float)n[i];
>>
On Feb 8, 2011, at 4:10 AM, Matteo Bruni
wrote:
+ /* We need the for loop, since we need to convert the
integer to a float */
+for (i = 0; i < count && i < desc.RegisterCount; i++)
+{
+row[0] = (float)n[i];
The cast is unneeded, and the comment above is
> + /* We need the for loop, since we need to convert the integer to a
> float */
> + for (i = 0; i < count && i < desc.RegisterCount; i++)
> + {
> + row[0] = (float)n[i];
The cast is unneeded, and the comment above is too.