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();

unity, GL.TexCoord or GL.Color must put before GL.Vertex!!!的更多相关文章

  1. unity Changing Game View background color

    Change the background color in the camera 参考:http://forum.unity3d.com/threads/changing-game-view-bac ...

  2. 用GL画出人物的移动路径

    注意:用Debug画的线会存在穿透问题 没啥好解释的,直接看代码: using UnityEngine; using System.Collections; using System.Collecti ...

  3. unity3d 使用GL 方式画线

    这个是画线部分 private Vector3[] linePoints; public int m_LineCount; public int m_PointUsed; public void Re ...

  4. 通过GL函数处理图片以及其它相关功能

    我们知道在屏幕后处理里面通过 Graphics.Blit 函数可以通过材质处理屏幕图片, 当我们想要处理一般图片的时候, 直接调用GL函数就行了, 按照习惯自己封装一个 Blit 方法 : ) { i ...

  5. 初级入门 --- web GL绘制点

    " 万丈高楼平地起." 01基础知识 一.相关术语 图元 :WebGL 能够绘制的基本图形元素,包含三种:点.线段.三角形. 片元:可以理解为像素,像素着色阶段是在片元着色器中. ...

  6. Oracle EBS GL总账凭证取值

    SELECT gh.je_header_id, gh.period_name, gh.default_effective_date, gh.je_source, gs.user_je_source_n ...

  7. Unity3D笔记十八 GL图像库

    1.绘制2D图像的时需要使用GL.LoadOrtho()方法来将图形映射到平面中. 2.所有绘制相关的内容都要写在OnPostRender()方法中. 3.有关GL图像库的脚本需要绑定到Hierarc ...

  8. Qt编译出错 GL/gl.h:No such file or directory

    系统:Ubuntu18.04 软件:QtCreator4.8 Qt5.9.8 编译Qt Widgets Application类型的项目时,出现错误,提示: GL/gl.h: No such file ...

  9. Unity中简单使用Opengl

    简介 由于项目特殊需求,需要在unity中使用一些OpenGL的东西来绘制图形(PS:其实就是有一个拖尾算法只有OpenGL版本~~~懒得改了,直接在unity中使用OpenGL算了).所以琢磨咯下如 ...

随机推荐

  1. Asp.Net中Ajax实现登陆判断

    Default.aspx: <head runat="server"> <title>无标题页</title> <script type= ...

  2. yii2 ArrayHelper map 使用

    <不喜勿喷> 引用类 use yii\helpers\ArrayHelper; 源码中修改(尽量不要修改,可以研究下不修改的方式) 源码路径 查看数据 视图层 实现效果

  3. iOS常用设计模式:MVC、单例、代理、观察者。

    MVC 模型-视图-控制器(MVC)设计模式 MVC根据角色划分类,涉及到三个角色: Model:模型保存应用程序的数据. View:视图是模型的可视化表示以及用户交互的控件. Controller: ...

  4. Nearest number - 2_暴力&&bfs

    Description Input is the matrix A of N by N non-negative integers. A distance between two elements A ...

  5. 【转发】构建高可伸缩性的WEB交互式系统(中)

    原文转自:http://kb.cnblogs.com/page/503953/ 在<构建高可伸缩性的WEB交互式系统>的第一篇,我们介绍了Web交互式系统中平台的可伸缩性.本文将描述模块的 ...

  6. csdn第三名

    编号:1026时间:22016年7月18日11:10:35功能:csdn第三名URL :http://blog.csdn.net/phphot

  7. jq实现动态添加样式

    <script> $(function(){ $("#list_zlm > a").hover(function(){ $(this).addClass(&quo ...

  8. 织梦dedecms 用交叉栏目时arclist标签调用不出内容文章的问题(纯转载)

    本文转自:http://www.cnblogs.com/cnteam/articles/4056702.html 最近用了交叉栏目发现当为手动指定交叉栏目ID时用arclist标签不能调出相关文章最后 ...

  9. 转载几篇关于GNU autotools的文章

    http://www.laruence.com/2009/11/18/1154.html http://www.ibm.com/developerworks/cn/linux/l-makefile/ ...

  10. HDU 4358 莫队算法+dfs序+离散化

    Boring counting Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 98304/98304 K (Java/Others)T ...