Initializing GL_List for processing.
glBegin(GL_POINTS);
for (i = 0; i < faceNum; i++)
{
mesh->GetFaceNodes(i + 1, ver[0], ver[1], ver[2], ver[3]);
**glVertex4i(ver[0] - 1, ver[1] - 1, ver[2] - 1, i+1);**
}
glEnd();
glEndList();
Vertex Shader gives me a compilation error and doesn't know why.
Vertex Shader:
varying out float final;
void main( void )
{
final = float(gl_Vertex.w); // want to pass this face index on to
}
Geometry Shader:
varying in float final[];
varying out float final_tofrag;
final_tofrag=final[0];
//Doing other calculations here they are totally different
Fragment Shader:
varying in float final_tofrag;
void main( void )
{
if (color.z<0.0)
gl_FragData[0] = vec4(float(final_frag),float(final_frag), -(gl_FragCoord.z), 0); // want to check that value of the final(gl_vertex.w) is being passed from vertex shader to fragment shader or not. Its giving me 0.00000;
else
gl_FragData[0] = vec4(float(final_frag), float(final_frag), gl_FragCoord.z, 0);
}