unity, GL.TexCoord or GL.Color must put before GL.Vertex!!!
GL.Begin(GL.QUADS);
?? ??? ?
?? ??? ?//in unity, should use left hand rule
?? ??? ?//RU
?? ??? ?GL.TexCoord2 (1,1);//GL.TexCoord must be put before GL.Vertex!!!
? GL.Color(Color.red);//GL.Color must be put before GL.Vertex!!!
?? ??? ?GL.Vertex3(RU.x,RU.y,0);
?? ??? ?//RD
?? ??? ?GL.TexCoord2 (1,0);
GL.Color(Color.green);
?? ??? ?GL.Vertex3(RD.x,RD.y,0);
?? ??? ?//LD
?? ??? ?GL.TexCoord2 (0,0);
GL.Color(Color.blue);
?? ??? ?GL.Vertex3(LD.x,LD.y,0);
?? ??? ?//LU
?? ??? ?GL.TexCoord2 (0,1);
?? GL.Color(Color.yellow);
?? ??? ?GL.Vertex3(LU.x,LU.y,0);
?? ??? ?
?? ??? ?GL.End();
轉(zhuǎn)載于:https://www.cnblogs.com/wantnon/p/5421686.html
總結(jié)
以上是生活随笔為你收集整理的unity, GL.TexCoord or GL.Color must put before GL.Vertex!!!的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。