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();
unity, GL.TexCoord or GL.Color must put before GL.Vertex!!!的更多相关文章
- unity Changing Game View background color
Change the background color in the camera 参考:http://forum.unity3d.com/threads/changing-game-view-bac ...
- 用GL画出人物的移动路径
注意:用Debug画的线会存在穿透问题 没啥好解释的,直接看代码: using UnityEngine; using System.Collections; using System.Collecti ...
- unity3d 使用GL 方式画线
这个是画线部分 private Vector3[] linePoints; public int m_LineCount; public int m_PointUsed; public void Re ...
- 通过GL函数处理图片以及其它相关功能
我们知道在屏幕后处理里面通过 Graphics.Blit 函数可以通过材质处理屏幕图片, 当我们想要处理一般图片的时候, 直接调用GL函数就行了, 按照习惯自己封装一个 Blit 方法 : ) { i ...
- 初级入门 --- web GL绘制点
" 万丈高楼平地起." 01基础知识 一.相关术语 图元 :WebGL 能够绘制的基本图形元素,包含三种:点.线段.三角形. 片元:可以理解为像素,像素着色阶段是在片元着色器中. ...
- Oracle EBS GL总账凭证取值
SELECT gh.je_header_id, gh.period_name, gh.default_effective_date, gh.je_source, gs.user_je_source_n ...
- Unity3D笔记十八 GL图像库
1.绘制2D图像的时需要使用GL.LoadOrtho()方法来将图形映射到平面中. 2.所有绘制相关的内容都要写在OnPostRender()方法中. 3.有关GL图像库的脚本需要绑定到Hierarc ...
- 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 ...
- Unity中简单使用Opengl
简介 由于项目特殊需求,需要在unity中使用一些OpenGL的东西来绘制图形(PS:其实就是有一个拖尾算法只有OpenGL版本~~~懒得改了,直接在unity中使用OpenGL算了).所以琢磨咯下如 ...
随机推荐
- 我与python3擦肩而过(二)—— csv文件头哪去啦?
在看Python Data Visualization Cookbook 这本书(基于python2),开始时读取csv文件头的时候出现问题.查了资料,又是python3的问题,从这个链接找到答案. ...
- Shell’s Sort
Solution 1 : (数据结构与算法分析 C++描述 第三版) template<class T> void shellSort(vector<T> &v) { ...
- iOS 微信 音频 视频自动播放
iOS 微信 音频 视频自动播放 http://www.w3ctech.com/topic/1165
- Mobile phones_二维树状数组
[题意]给你一个矩阵(初始化为0)和一些操作,1 x y a表示在arr[x][y]加上a,2 l b r t 表示求左上角为(l,b),右下角为(r,t)的矩阵的和. [思路]帮助更好理解树状数组. ...
- Corporative Network_并查集
Description A very big corporation is developing its corporative network. In the beginning each of t ...
- cookie 作用域
在http://xiaoyou-game.com/user/login方法中设置cookie: setcookie('username',$username,time()+3600,'/user/', ...
- USB 描述符
标准的USB设备有5种USB描述符:设备描述符,配置描述符,字符串描述符,接口描述符,端点描述符. // Standard Device Descriptor typedef struct { u8 ...
- 跟开涛老师学shiro -- INI配置
之前章节我们已经接触过一些INI配置规则了,如果大家使用过如spring之类的IoC/DI容器的话,Shiro提供的INI配置也是非常类似的,即可以理解为是一个IoC/DI容器,但是区别在于它从一个根 ...
- 150. Evaluate Reverse Polish Notation
Valid operators are +, -, *, /. Each operand may be an integer or another expression. Some examples: ...
- 2015GitWebRTC编译实录6
2015.07.20 libbitrate_controller 编译通过依赖system_wrappers lib,编写测试代码时需要注意.[425/1600 ] CXX obj /webrtc/m ...