Vertex program:
struct Mystruct {
float fval;
int index;
};
#define ARRAY_LEN 10
typedef Mystruct MystructArray[ ARRAY_LEN ];
int FooFunc( out MystructArray isect )
{
return 10;
}
void main( )
{
int i, index;
MystructArray sarray;
for ( i = 0; i (less than) ARRAY_LEN; i++ ) {
sarray[ i ].fval = 1.0F;
sarray[ i ].index = 0;
}
index = FooFunc( sarray );
for ( i = 0; i (less than) ARRAY_LEN; i++ )
if ( sarray[ i ].fval (less than) 10.0F )
index = sarray[ i ].index;
if ( index == 0 )
gl_Position = vec4( 1.0F, 0.0F, 1.0F, 1.0F );
else
gl_Position = ftransform( );
}
Gives the following error:
Internal error: assembly compile error for vertex shader at offset 0:
– error message –
line 1, column 1: error: invalid vertex program header
– internal assembly text –
In FooFunc if you change the parameter from ‘out’ to ‘in’ you simply get:
warning: no vertex attribute is explicitly assigned to vertex attribute zero
jra ( or others ) is there a time frame for the 65 drivers? I’m tapped out on the current ones…