2012/7/8 Rico Schüller <kgbricola(a)web.de>:
> ---
> dlls/d3dx9_36/tests/effect.c | 90
> ++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 90 insertions(+), 0 deletions(-)
>
Hi Rico,
maybe it's just me misunderstanding this, but:
+ FLOAT fvalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
+ D3DXMATRIX *matrix_pointer_array[sizeof(fvalue)/sizeof(D3DXMATRIX)];
+ UINT l, k, m, element;
+
+ for (element = 0; element <= res_desc->Elements + 1; ++element)
+ {
+ memset(fvalue, 0xab, sizeof(fvalue));
+ for (l = 0; l < element; ++l)
+ {
+ matrix_pointer_array[l] = (D3DXMATRIX *)&fvalue[l *
sizeof(**matrix_pointer_array) / sizeof(*matrix_pointer_array)];
+ }
I don't quite understand what you're trying to achieve with
"sizeof(**matrix_pointer_array) / sizeof(*matrix_pointer_array)". As
far as I can see, that depends on the size of the pointer (32/64 bits)
and I'm not sure that the offset should change in that case. Maybe you
meant to use sizeof(float) as divisor?