QUADS
Mode for GL.Begin: draw quads.
Read time 1 minuteLast updated 2 days ago
Definition
- Type: Field
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public const int QUADS = 7
Remarks
Draws quads using each set of 4 vertices passed. If you pass 4 vertices, one quad is drawn, where each vertex becomes one corner of the quad. If you pass 8 vertices, 2 quads will be drawn.
To set up the screen for drawing in 2D, use GL.LoadOrtho or GL.LoadPixelMatrix. To set up the screen for drawing in 3D, use GL.LoadIdentity followed by GL.MultMatrix with the desired transformation matrix.
To draw quads without immediate mode, use a mesh with MeshTopology.Quads and Graphics.RenderMesh. For an example that uses a different topology, refer to GL.