NAME

glRenderMode - set rasterization mode

C SPECIFICATION

GLint ggllRReennddeerrMMooddee( GLenum _m_o_d_e )

        

PARAMETERS

_m_o_d_e
Specifies the rasterization mode. Three values are accepted: GGLL__RREENNDDEERR, GGLL__SSEELLEECCTT, and GGLL__FFEEEEDDBBAACCKK. The initial value is GGLL__RREENNDDEERR.

DESCRIPTION

ggllRReennddeerrMMooddee sets the rasterization mode. It takes one argument, _m_o_d_e, which can assume one of three predefined values:
GGLL__RREENNDDEERR
Render mode. Primitives are rasterized, producing pixel fragments, which are written into the frame buffer. This is the normal mode and also the default mode.
GGLL__SSEELLEECCTT
Selection mode. No pixel fragments are produced, 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 GGLL__RREENNDDEERR is returned in a select buffer, which must be created (see ggllSSeelleeccttBBuuffffeerr) before selection mode is entered.
GGLL__FFEEEEDDBBAACCKK
Feedback mode. No pixel fragments are produced, 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 GGLL__RREENNDDEERR is returned in a feedback buffer, which must be created (see ggllFFeeeeddbbaacckkBBuuffffeerr) before feedback mode is entered.

The return value of ggllRReennddeerrMMooddee is determined by the render mode at the time ggllRReennddeerrMMooddee is called, rather than by _m_o_d_e. The values returned for the three render modes are as follows:

GGLL__RREENNDDEERR
0.
GGLL__SSEELLEECCTT
The number of hit records transferred to the select buffer.
GGLL__FFEEEEDDBBAACCKK
The number of values (not vertices) transferred to the feedback buffer.

See the ggllSSeelleeccttBBuuffffeerr and ggllFFeeeeddbbaacckkBBuuffffeerr reference pages for more details concerning selection and feedback operation.

NOTES

If an error is generated, ggllRReennddeerrMMooddee returns 0 regardless of the current render mode.

ERRORS

GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _m_o_d_e is not one of the three accepted values.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllSSeelleeccttBBuuffffeerr is called while the render mode is GGLL__SSEELLEECCTT, or if ggllRReennddeerrMMooddee is called with argument GGLL__SSEELLEECCTT before ggllSSeelleeccttBBuuffffeerr is called at least once.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllFFeeeeddbbaacckkBBuuffffeerr is called while the render mode is GGLL__FFEEEEDDBBAACCKK, or if ggllRReennddeerrMMooddee is called with argument GGLL__FFEEEEDDBBAACCKK before ggllFFeeeeddbbaacckkBBuuffffeerr is called at least once.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllRReennddeerrMMooddee is executed between the execution of ggllBBeeggiinn and the corresponding execution of ggllEEnndd.

ASSOCIATED GETS

ggllGGeett with argument GGLL__RREENNDDEERR__MMOODDEE

SEE ALSO

ggllFFeeeeddbbaacckkBBuuffffeerr((33GG)), ggllIInniittNNaammeess((33GG)), ggllLLooaaddNNaammee((33GG)), ggllPPaassssTThhrroouugghh((33GG)), ggllPPuusshhNNaammee((33GG)), ggllSSeelleeccttBBuuffffeerr((33GG))