GL绘制一个矩形 àì夳堔傛蜴生んèń 2022-07-15 00:10 155阅读 0赞 void OnPostRender() { if (!Material) { Debug.LogError("Please Assign a material on the inspector"); return; } GL.PushMatrix(); Material.SetPass(0); GL.LoadOrtho(); GL.Begin(GL.QUADS); GL.TexCoord2(0, 0);GL.Vertex3(0.25F, 0.25F, 0);//屏幕左下角 GL.TexCoord2(0, 1);GL.Vertex3(0.25F, 0.75F, 0);//屏幕左上角 GL.TexCoord2(1, 1);GL.Vertex3(0.75F, 0.75F, 0);//屏幕右上角 GL.TexCoord2(1, 0);GL.Vertex3(0.75F, 0.25F, 0);//屏幕右下角 GL.End(); GL.PopMatrix(); } 用GL绘制一个矩形
还没有评论,来说两句吧...