Vertex Shader

Started by
3 comments, last by bala_dbhat 17 years, 10 months ago
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?
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...

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.

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

Mars, you are absolutely right...
I have Radeon 7500 :-)
So, no more loops in my shaders

Thanks

This topic is closed to new replies.

Advertisement