publicclassExampleClass:MonoBehaviour{publicMaterialmat;voidOnPostRender(){if(!mat) {Debug.LogError("Please Assign a material on the inspector");return; }GL.PushMatrix(); mat.SetPass(0);GL.LoadOrtho();GL.Begin(GL.QUADS);GL.Color(Color.red);GL.Vertex3(0,0.5F,0);GL.Vertex3(0.5F,1,0...
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { public Material mat; void OnPostRender() { if (!mat) { Debug.LogError("Please Assign a material on the inspector"); return; } GL.PushMatrix(); mat.SetPass(0); GL.LoadOrtho(); GL.Begin(GL.QUADS);...
GL_TRIANGLES: return count % 3 == 0; case GL11.GL_LINE: return count % 2 == 0; } return false; } Example 6Source File: BakedQuadVertexBuilder.java From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes public BakedQuadVertexBuilder() { this(GL11.GL_QUADS); } ...
Example: If cells = [ [0,1,2,3], [4,5,1,0] ], then the functions returns [ [0,1,2], [0,2,3], [4,5,1], [4,1,0] ]. Readme Keywords stackgl gl webgl index quad tri triangle indicesPackage Sidebar Install npm i gl-quads-to-tris Repository github.com/Erkaman/gl-quad...
public class Example :MonoBehaviour{ // Draw red a rombus on the screen // and also draw a small cyan Quad in the left cornerMaterialmat; void OnPostRender() { if (!mat) {Debug.LogError("Please Assign a material on the inspector"); return; }GL.PushMatrix(); mat.SetPass(0);GL.Lo...
public class Example : MonoBehaviour { // Draw red a rombus on the screen // and also draw a small cyan Quad in the left corner Material mat; void OnPostRender() { if (!mat) { Debug.LogError("Please Assign a material on the inspector"); return; } GL.PushMatrix(); mat.SetPass(...
public class Example : MonoBehaviour { // Draw red a rombus on the screen // and also draw a small cyan Quad in the left corner Material mat; void OnPostRender() { if (!mat) { Debug.LogError("Please Assign a material on the inspector"); return; } GL.PushMatrix(); mat.SetPass(...
public class ExampleClass :MonoBehaviour{ publicMaterialmat; void OnPostRender() { if (!mat) {Debug.LogError("Please Assign a material on the inspector"); return; }GL.PushMatrix(); mat.SetPass(0);GL.LoadOrtho();GL.Begin(GL.QUADS);GL.Color(Color.red);GL.Vertex3(0, 0.5F, 0);GL.Ve...
public class Example : MonoBehaviour { // Draw red a rombus on the screen // and also draw a small cyan Quad in the left corner Material mat; void OnPostRender() { if (!mat) { Debug.LogError("Please Assign a material on the inspector"); return; } GL.PushMatrix(); mat.SetPass(...
public class Example : MonoBehaviour { // Draw red a rombus on the screen // and also draw a small cyan Quad in the left corner Material mat; void OnPostRender() { if (!mat) { Debug.LogError("Please Assign a material on the inspector"); return; } GL.PushMatrix(); mat.SetPass(...