Gl.RenderMode
(gb.opengl)
Syntax
STATIC FUNCTION RenderMode ( Mode AS Integer ) AS Integer
Set rasterization mode
Parameters
Description
Gl.RenderMode sets the rasterization mode. It takes one argument, mode, which can assume one of three predefined values:
- Gl.GL_RENDER 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.
- Gl.GL_SELECT 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 was Gl.GL_RENDER is returned in a select buffer, which must be created (see Gl.SelectBuffer) before selection mode is entered.
- Gl.GL_FEEDBACK 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 had the render mode been Gl.GL_RENDER is returned in a feedback buffer, which must be created (see Gl.FeedbackBuffer) before feedback mode is entered.
The return value of Gl.RenderMode is determined by the render mode at the time Gl.RenderMode is called, rather than by mode. The values returned for the three render modes are as follows:
Refer to the Gl.SelectBuffer and Gl.FeedbackBuffer reference pages for more details concerning selection and feedback operation.
 |
If an error is generated, Gl.RenderMode returns zero regardless of the current render mode.
|
Errors
Gl.GL_INVALID_ENUM is generated if mode is not one of the three accepted values.
Gl.GL_INVALID_OPERATION is generated if Gl.SelectBuffer is called while the render mode is Gl.GL_SELECT, or if Gl.RenderMode is called with argument Gl.GL_SELECT before Gl.SelectBuffer is called at least once.
Gl.GL_INVALID_OPERATION is generated if Gl.FeedbackBuffer is called while the render mode is Gl.GL_FEEDBACK, or if Gl.RenderMode is called with argument Gl.GL_FEEDBACK before Gl.FeedbackBuffer is called at least once.
Gl.GL_INVALID_OPERATION is generated if Gl.RenderMode is called between a call to Gl.Begin and the corresponding call to Gl.End.
Associated Gets
Gl.GetRenderMode
See also
Gl.FeedbackBuffer, Gl.InitNames, Gl.LoadName, Gl.PassThrough, Gl.PushName, Gl.SelectBuffer