Graphics Reference
In-Depth Information
2.
The primitive type that is to be sent to the geometry shader is given by
glProgramParameteri( progname,
GL_GEOMETRY_INPUT_TYPE, intvalue)
where
intvalue
is a symbolic parameter for the primitive type that this
geometry shader will be receiving. This parameter can take on any one of
the five symbolic values
•
GL_POINTS
•
GL_LINES
•
GL_LINES_ADJACENCY
•
GL_TRIANGLES
•
GL_TRIANGLES_ADJACENCY
The kind of graphics primitive that can be passed to the geometry
shader depends on the kind of geometry that the shader is to emit.
•
If
GL_LINES
is chosen, the lines could actually come from
GL_LINES
,
GL_LINE_STRIP
, or
GL_LINE_LOOP
.
•
If
GL_LINES_ADJACENCY
is chosen, the lines with adjacency could
actually come from
GL_LINES_ADJACENCY
or
GL_LINE_STRIP_
ADJACENCY
.
•
If
GL_TRIANGLES
is chosen, the triangles could actually come from
GL_TRIANGLES
,
GL_TRIANGLE_STRIP
,
GL_TRIANGLE_FAN
,
GL_QUADS
,
or
GL_QUAD_STRIP
.
•
If
GL_TRIANGLES_ADJACENCY
is chosen, the triangles with adja-
cency could actually come from
GL_TRIANGLES_ADJACENCY
or
GL_
TRIANGLE_STRIP_ADJACENCY
.
3.
The actual primitive type that is to be emited from the geometry shader
is given by
glProgramParameteri(progname,
GL_GEOMETRY_OUTPUT_TYPE, intvalue)
where
intvalue
is a symbolic parameter for the primitive type that the
geometry shader will be emiting. This parameter can take on the sym-
bolic values
•
GL_POINTS
•
GL_LINE_STRIP
•
GL_TRIANGLE_STRIP