python-opengl icon indicating copy to clipboard operation
python-opengl copied to clipboard

Non-compiling example GLSL code section 3.2.6 (fix included)

Open ben-horner opened this issue 5 years ago • 1 comments

In section 3.2.6, in the second code section the GLSL for the fragment shader:

varying vec4 v_color;
void main()
{
  gl_FragColor = color;
}

I think it should be gl_FragColor = v_color I'm 100% new to opengl, and kinda new to python, this tripped me up for a while.

I think I have a slightly better sense of declaring input and output arguments to shaders look like (not exactly though) after having fiddled with that code until it worked.

I would have been able to proceed if the code worked though. :)

ben-horner avatar May 05 '20 04:05 ben-horner

Thanks ! I think you're right. Can you make a Pull Request? (you can do it through GitHub if you're not familiar with git)

rougier avatar May 14 '20 13:05 rougier