Win XP/6800/Whatever the latest nVidia drivers are.
Simple vertex program…
uniform some struct foo[ 10 ];
main( )
{
int i;
for ( i = 0; i (less than) 10; i++ ) {
somting that indexes foo[ i ].whatever;
}
}
This works fine. Buut if you have…
uniform int loop_count;
And change the for loop to…
for ( i = 0; i (less than) loop_count; i++ )
The loop will work but indexing ‘foo’ will not work.
Say in ‘main’ I declare “int j;” and then within
the loop do;
j = 0;
somthing = foo[ j ].whatever;
This works.
If I do:
if ( i == 0 )
j = 0;
else
j = 0;
somthing = foo[ j ].whatever;
Doesn’t work.
Indexing based on a uniform in a fragment program simply makes the compiler explode. But I’m not too worried about this yet.