GL Class  

Scripting > Runtime Classes > GL

Low-level graphics library.

Use this class to manipulate active transformation matrices, issue rendering commands similar to OpenGL's immediate mode and do other low-level graphics tasks. Note that in almost all cases using Graphics.DrawMesh is more efficient than using immediate mode drawing.

This class is only available in Unity Pro.

Class Variables
TRIANGLES

Mode for Begin: draw triangles.

TRIANGLE_STRIP

Mode for Begin: draw triangle strip.

QUADS

Mode for Begin: draw quads.

LINES

Mode for Begin: draw lines.

modelview

The current modelview matrix.

Class Functions
Vertex3

Submit a vertex.

Vertex

Submit a vertex.

Color

Sets current vertex color.

TexCoord

Sets current texture coordinate (v.x,v.y,v.z) for all texture units.

TexCoord2

Sets current texture coordinate (x,y) for all texture units.

TexCoord3

Sets current texture coordinate (x,y,z) for all texture units.

MultiTexCoord2

Sets current texture coordinate (x,y) for the texture unit unit.

MultiTexCoord3

Sets current texture coordinate (x,y,z) to the texture unit unit.

MultiTexCoord

Sets current texture coordinate (v.x,v.y,v.z) to the texture unit unit.

Begin

Begin drawing 3D primitives.

End

End drawing 3D primitives.

LoadOrtho

Helper function to set up an ortho perspective transform.

LoadPixelMatrix

Setup a matrix for pixel-correct rendering.

Viewport

Set the rendering viewport.

LoadProjectionMatrix

Load an arbitrary matrix to the current projection matrix.

LoadIdentity

Load the identity matrix to the current modelview matrix.

MultMatrix

Multiplies the current modelview matrix with the one specified.

PushMatrix

Saves both projection and modelview matrices to the matrix stack.

PopMatrix

Restores both projection and modelview matrices off the top of the matrix stack.

SetRevertBackfacing

Select whether to invert the backface culling (true) or not (false).

Clear

Clear the current render buffer.