1

Just simple programming with follow(from here)

float odd = floor(mod(gl_FragCoord.y, 2.0));  // problems come from this line 
gl_FragColor = vec4(v_color.x, v_color.y, v_color.z, odd);

But it can not pass the link.

I know it is quite simple,but it is quiet new for me, I just want to go through this problem. Thanks for letting me know.

Forrest
  • 122,703
  • 20
  • 73
  • 107
  • Just to be sure, you are placing these lines in your fragment shader, correct? Also, what does `glGetShaderInfoLog()` report in the log as a compile error for this line? – Brad Larson Apr 30 '11 at 21:10
  • thanks ! Yes, just replace from creating project directly from xcode4 template. And with error like these 2011-05-01 11:12:21.307 OpenGL2[1577:207] Failed to validate program: 1 2011-05-01 11:12:21.323 OpenGL2[1577:207] Program validate log: Validation Failed: Link error: Program is not successfully linked. – Forrest May 01 '11 at 03:13

0 Answers0