Is there any way of obtaining the primitive type from within the vertex shader. ie I want to know if I am rendering a triangle, quad, tristrip, quadstrip, point, line, linestrip. Set by the command glBegin(GL_XXXX);
As far as I can see in the glsl spec, the available state is limited to the current vertex, col, normal, matrix, lighting.
Is there a way to have that information without modifying the program.