Sign in to follow this  
bala_dbhat

Vertex Shader

Recommended Posts

The following vertex shader gives compilation error void main() { ............ for (int i=0; i< gl_MaxTextureUnits; i++) gl_TexCoord[i] = gl_ModelViewProjectionMatrix * gl_Vertex; ............. } The error is : "array must be redeclared with a size before being indexed with a variable" What is the reason for the error? How should be the re-declaration?

Share this post


Link to post
Share on other sites
What hardware are you on? Is that all the code you have for that shader? I know that I can compile that code and it works...

Share this post


Link to post
Share on other sites

I used Apple software renderer (ID - 0X00020400) with 256MB RAM on an eMac G4 machine (10.4.4)

In the shader, I'm setting gl_Position properly other than setting the texture coord.

Share this post


Link to post
Share on other sites
Quote:
Original post by bala_dbhat

I used Apple software renderer (ID - 0X00020400) with 256MB RAM on an eMac G4 machine (10.4.4)

In the shader, I'm setting gl_Position properly other than setting the texture coord.


Hmmm what video card does that eMac have? If its a Geforce 4 or older than a 9500 series card I think your screwed, loops aren't support on older hardware IIRC. I know Geforce6/7 series and possibly Radeons 9500 to 9800 may, but the new x1000 series does for sure. HTH

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this