GLRENDERMODE(3G) UNIX Programmer's Manual GLRENDERMODE(3G)
glRenderMode - set rasterization mode
GLint glRenderMode( GLenum mode )
mode Specifies the rasterization mode. Three values are
accepted: GL_RENDER, GL_SELECT, and GL_FEEDBACK. The
initial value is GL_RENDER.
glRenderMode sets the rasterization mode. It takes one argu-
ment, mode, which can assume one of three predefined values:
GL_RENDER Render mode. Primitives are rasterized, pro-
ducing pixel fragments, which are written
into the frame buffer. This is the normal
mode and also the default mode.
GL_SELECT Selection mode. No pixel fragments are pro-
duced, and no change to the frame buffer
contents is made. Instead, a record of the
names of primitives that would have been
drawn if the render mode had been GL_RENDER
is returned in a select buffer, which must
be created (see glSelectBuffer) before
selection mode is entered.
GL_FEEDBACK Feedback mode. No pixel fragments are pro-
duced, and no change to the frame buffer
contents is made. Instead, the coordinates
and attributes of vertices that would have
been drawn if the render mode had been
GL_RENDER is returned in a feedback buffer,
which must be created (see glFeedbackBuffer)
before feedback mode is entered.
The return value of glRenderMode is determined by the render
mode at the time glRenderMode is called, rather than by
mode. The values returned for the three render modes are as
follows:
GL_RENDER 0.
GL_SELECT The number of hit records transferred to the
select buffer.
GL_FEEDBACK The number of values (not vertices)
transferred to the feedback buffer.
MirOS BSD #10-current Printed 20.2.2012 1
GLRENDERMODE(3G) UNIX Programmer's Manual GLRENDERMODE(3G)
See the glSelectBuffer and glFeedbackBuffer reference pages
for more details concerning selection and feedback opera-
tion.
If an error is generated, glRenderMode returns 0 regardless
of the current render mode.
GL_INVALID_ENUM is generated if mode is not one of the three
accepted values.
GL_INVALID_OPERATION is generated if glSelectBuffer is
called while the render mode is GL_SELECT, or if
glRenderMode is called with argument GL_SELECT before
glSelectBuffer is called at least once.
GL_INVALID_OPERATION is generated if glFeedbackBuffer is
called while the render mode is GL_FEEDBACK, or if
glRenderMode is called with argument GL_FEEDBACK before
glFeedbackBuffer is called at least once.
GL_INVALID_OPERATION is generated if glRenderMode is exe-
cuted between the execution of glBegin and the corresponding
execution of glEnd.
glGet with argument GL_RENDER_MODE
glFeedbackBuffer(3G), glInitNames(3G), glLoadName(3G),
glPassThrough(3G), glPushName(3G), glSelectBuffer(3G)
MirOS BSD #10-current Printed 20.2.2012 2
Generated on 2012-02-20 02:47:02 by $MirOS: src/scripts/roff2htm,v 1.70 2011/12/03 18:21:12 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2011 The MirOS Project, Germany.
This product includes material
provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.