F
glFeedbackBuffer
Chapter 6
151
in the feedback buffer. It can also occur after polygons with more than three edges are
broken up into triangles, if the GL implementation renders polygons by performing this
decomposition.
The glPassThrough command can be used to insert a marker into the feedback buffer.
See glPassThrough.
Following is the grammar for the blocks of values written into the feedback buffer. Each
primitive is indicated with a unique identifying value followed by some number of
vertices. Polygon entries include an integer value indicating how many vertices follow. A
vertex is fed back as some number of floating-point values, as determined by type. Colors
are fed back as four values in RGBA mode and one value in color index mode.
feedbackList ← feedbackItem feedbackList | feedbackItem
feedbackItem ← point | lineSegment | polygon | bitmap | pixelRectangle | passThru
point ← GL_POINT_TOKEN vertex
lineSegment ← GL_LINE_TOKEN vertex vertex | GL_LINE_RESET_TOKEN vertex
vertex
polygon ← GL_POLYGON_TOKEN n polySpec
polySpec ← polySpec vertex | vertex vertex vertex
bitmap ← GL_BITMAP_TOKEN vertex
pixelRectangle ← GL_DRAW_PIXEL_TOKEN vertex |GL_COPY_PIXEL_TOKEN
vertex
passThru ← GL_PASS_THROUGH_TOKEN value
vertex ← 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture
2d ← value value
3d ← value value value
3dColor ← value value value color
3dColorTexture ← value value value color tex
4dColorTexture ← value value value value color tex
color ← rgba | index
rgba ← value value value value
index ← value
tex ← value value value value
value is a floating-point number, and n is a floating-point integer giving the number of
vertices in the polygon. GL_POINT_TOKEN, GL_LINE_TOKEN,
GL_LINE_RESET_TOKEN, GL_POLYGON_TOKEN, GL_BITMAP_TOKEN,
GL_DRAW_PIXEL_TOKEN, GL_COPY_PIXEL_TOKEN and
GL_PASS_THROUGH_TOKEN are symbolic floating-point constants.
GL_LINE_RESET_TOKEN is returned whenever the line stipple pattern is reset. The
data returned as a vertex depends on the feedback type.