GL.Begin Manual     Reference     Scripting  
Scripting > Runtime Classes > GL
GL.Begin

static function Begin (mode : int) : void

Parameters

NameDescription
mode Primitives to draw: can be TRIANGLES, TRIANGLE_STRIP, QUADS or LINES.

Description

Begin drawing 3D primitives.

In OpenGL this matches glBegin; on other graphics APIs the same functionality is emulated. Between GL.Begin and GL.End it is valid to call GL.Vertex, GL.Color, GL.TexCoord and other immediate mode drawing functions.

You should be careful about culling when drawing primitives yourself. The culling rules may be different depending on which graphics API the game is running. In most cases the safest way is to use Cull Off command in the shader.

See Also: GL.End.