gl_开头的变量都是glsl的内置变量:
定点位置的计算方法:
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex = ftransform();
片段颜色:
gl_FragColor,可以向其中写入片断的颜色值
attribute vec4 gl_Color;
varying vec4 gl_FrontColor; // writable onthe vertex shader
varying vec4 gl_BackColor; // writable onthe vertex shader
varying vec4 gl_Color; // readable on thefragment shader