I am writing a GLSL geometry shader and I am trying to use the lines_adjacency
input layout but it isn't working. My first pass-though test using the lines
input layout works fine:
// GLSL GEOMETRY SHADER
#version 410
layout (lines) in;
layout (line_strip, max_vertices = 2) out;
void main ()
{
gl_Position = gl_in[0].gl_Position;
EmitVertex();
gl_Position = gl_in[1].gl_Position;
EmitVertex();
EndPrimitive();
}
but when I switch to lines_adjacency
input it doesn't draw anything:
// GLSL GEOMETRY SHADER
#version 410
layout (lines_adjacency) in;
layout (line_strip, max_vertices = 2) out;
void main ()
{
gl_Position = gl_in[1].gl_Position;
EmitVertex();
gl_Position = gl_in[2].gl_Position;
EmitVertex();
EndPrimitive();
}
I know I'm not actually using the adjacency points here but I will need them eventually. I am a GLSL novice so any help would be appreciated, thanks.