Initializing GL_List for processing.
glBegin(GL_POINTS);
for (i = 0; i < faceNum; i++)
{
mesh->GetFaceNodes(i
The code in the question does not make any sense. The GLSL keyword varying
was chosen because it was meant to reflect the property that the data will be different for each fragment, due to the automatic interpolation across the primitive. This happens only between the last programmable shader stage before the rasrerizer and the fragment shader.
In the beginning, there was only the vertex shader and the fragment shader. The VS would get attribute
s as input, and output to varying
s, which would be interpolation and become inputs to the FS.
With the introduction of the Geometry Shader in GL 3.0 / GLSL 1.30, this scheme did not make sense any more. The outputs of the VS would not be interpolated any more, but become direct inputs of the GS. As a result, the keywords attribute
and varying
where removed from GLSL, and replaced by the more general in
/ out
scheme.
As a result, a GS with varying
cannot exist. You either use legacy GLSL which doesn't support Geometry Shaders, or you use a newer GLSL with in
/out
.