• Advertisement
Sign in to follow this  

Vertex Shader

This topic is 4294 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The following vertex shader gives compilation error void main() { ............ for (int i=0; i< gl_MaxTextureUnits; i++) gl_TexCoord = 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
Advertisement
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
Sign in to follow this  

  • Advertisement