GL
class in UnityEngine · UnityEngine.CoreModule
Immediate-mode drawing: GL.Begin ... End primitives (triangles, strips, quads, lines) in pixel space (LoadPixelMatrix), the unit square (LoadOrtho), a loaded projection, or the rendering camera's view (the default, as in OnPostRender), with the material SetPass picked (its main texture) and the vertex colors; there's no depth test. Lines are one pixel wide. Into RenderTexture.active when one is set (in order with blits and copies, before the frame's cameras; GL.Clear clears it); otherwise over the frame, after the canvases and under IMGUI.
Fields 5
const int LINESconst int LINE_STRIPconst int QUADSconst int TRIANGLESconst int TRIANGLE_STRIPProperties 4
static bool invertCulling { get; set; }static Matrix4x4 modelview { get; set; }static bool sRGBWrite { get; set; }static bool wireframe { get; set; }Methods 27
static void Begin(int mode)static void Clear(bool clearDepth, bool clearColor, Color backgroundColor, float depth = 1f)Clears RenderTexture.active's color. The screen can't be cleared mid-frame (the frame is drawn once, after scripts): that says so once.
static void ClearWithSkybox(bool clearDepth, Camera camera)static void End()static void Flush()static void InvalidateState()static void IssuePluginEvent(int eventID)static void IssuePluginEvent(IntPtr callback, int eventID)static void LoadIdentity()static void LoadOrtho()Vertices in the unit square: (0, 0) bottom left, (1, 1) top right.
static void LoadPixelMatrix()static void LoadPixelMatrix(float left, float right, float bottom, float top)Vertices in pixels from the bottom left of the screen.
static void LoadProjectionMatrix(Matrix4x4 mat)static void MultMatrix(Matrix4x4 m)static void MultiTexCoord(int unit, Vector3 v)static void MultiTexCoord2(int unit, float x, float y)static void MultiTexCoord3(int unit, float x, float y, float z)static void PopMatrix()static void PushMatrix()static void RenderTargetBarrier()static void SetRevertBackfacing(bool revertBackFaces)static void TexCoord(Vector3 v)static void TexCoord2(float x, float y)static void TexCoord3(float x, float y, float z)static void Vertex(Vector3 v)static void Vertex3(float x, float y, float z)static void Viewport(Rect pixelRect)