1GLRENDERMODE(3G) GLRENDERMODE(3G)
2
3
4
6 glRenderMode - set rasterization mode
7
8
10 GLint glRenderMode( GLenum mode )
11
12
14 mode Specifies the rasterization mode. Three values are accepted:
15 GL_RENDER, GL_SELECT, and GL_FEEDBACK. The initial value is
16 GL_RENDER.
17
19 glRenderMode sets the rasterization mode. It takes one argument, mode,
20 which can assume one of three predefined values:
21
22 GL_RENDER Render mode. Primitives are rasterized, producing pixel
23 fragments, which are written into the frame buffer.
24 This is the normal mode and also the default mode.
25
26 GL_SELECT Selection mode. No pixel fragments are produced, and
27 no change to the frame buffer contents is made.
28 Instead, a record of the names of primitives that would
29 have been drawn if the render mode had been GL_RENDER
30 is returned in a select buffer, which must be created
31 (see glSelectBuffer) before selection mode is entered.
32
33 GL_FEEDBACK Feedback mode. No pixel fragments are produced, and no
34 change to the frame buffer contents is made. Instead,
35 the coordinates and attributes of vertices that would
36 have been drawn if the render mode had been GL_RENDER
37 is returned in a feedback buffer, which must be created
38 (see glFeedbackBuffer) before feedback mode is entered.
39
40 The return value of glRenderMode is determined by the render mode at
41 the time glRenderMode is called, rather than by mode. The values
42 returned for the three render modes are as follows:
43
44 GL_RENDER 0.
45
46 GL_SELECT The number of hit records transferred to the select
47 buffer.
48
49 GL_FEEDBACK The number of values (not vertices) transferred to the
50 feedback buffer.
51
52 See the glSelectBuffer and glFeedbackBuffer reference pages for more
53 details concerning selection and feedback operation.
54
56 If an error is generated, glRenderMode returns 0 regardless of the cur‐
57 rent render mode.
58
60 GL_INVALID_ENUM is generated if mode is not one of the three accepted
61 values.
62
63 GL_INVALID_OPERATION is generated if glSelectBuffer is called while the
64 render mode is GL_SELECT, or if glRenderMode is called with argument
65 GL_SELECT before glSelectBuffer is called at least once.
66
67 GL_INVALID_OPERATION is generated if glFeedbackBuffer is called while
68 the render mode is GL_FEEDBACK, or if glRenderMode is called with argu‐
69 ment GL_FEEDBACK before glFeedbackBuffer is called at least once.
70
71 GL_INVALID_OPERATION is generated if glRenderMode is executed between
72 the execution of glBegin and the corresponding execution of glEnd.
73
75 glGet with argument GL_RENDER_MODE
76
78 glFeedbackBuffer(3G), glInitNames(3G), glLoadName(3G),
79 glPassThrough(3G), glPushName(3G), glSelectBuffer(3G)
80
81
82
83 GLRENDERMODE(3G)