Map literals are like struct literals, but the keys are required.package main import "fmt"type Vertex struct { Lat, Long float64}var m = map[string...
分类:
其他好文 时间:
2014-10-28 00:17:02
阅读次数:
141
1.uniform变量uniform变量是外部application程序传递给(vertex和fragment)shader的变量。因此它是application通过函数glUniform**()函数赋值的。在(vertex和fragment)shader程序内部,uniform变量就像是C语言里面...
分类:
其他好文 时间:
2014-10-27 17:29:10
阅读次数:
175
The expressionnew(T)allocates a zeroedTvalue and returns a pointer to it.var t *T = new(T)ort := new(T)package main import "fmt"type Vertex struct { ....
分类:
其他好文 时间:
2014-10-27 01:44:40
阅读次数:
177
Struct fields are accessed using a dot.package main import "fmt"type Vertex struct { X int Y int}func main() { v := Vertex{1, 2} v.X = 4 ...
分类:
其他好文 时间:
2014-10-27 00:13:16
阅读次数:
248
这节需要把顶点布局写在文件里面,为了方便,因为一大串非常抽象的坐标放在CPP和程序混在一起非常的不方便。
下面全为c++知识,读取文件里面的特定格式的数据:
Vertex Count: 36
Data:
-1.0 1.0 -1.0 0.0 0.0 0.0 0.0 -1.0
1.0 1.0 -1.0 1.0 0.0 0.0 0.0 -1.0
-1.0 -1.0 -1.0 0.0...
分类:
其他好文 时间:
2014-10-20 15:10:53
阅读次数:
202
本章在上一章的基础上讲解顶点缓存数组(Vertex Buffer Object)即VBO的使用,使用VBO来实现金字塔和立方体的绘制,
绘制的效果和上一章相同。这个系列教程主要是采用实例演示 Opengl ES 1.x NDK开发,对一些要点进行解释,因此对API的用
法和说明较少,建议初学者可以参考Opengl ES 1.x的API手册。
本章示例了VBO缓存顶点、颜色和索引的用法。
>>>为什么要使用VBO?
VBO的数据存放在显卡内存中,能节省从系统内存复制到显卡内存中的时间,提高...
分类:
其他好文 时间:
2014-10-20 15:10:36
阅读次数:
275
这个问题是Unity4.5版本的一个bug,导入的"Water(Basic)"中的水显示出来没有波浪等动态效果解决办法:一:导入完整的4.3版本的Water(Basic)二:修改Water(Basic)->Sources->Shade->FX-WaterSimple.shader//unity4.3.0
//line45
temp.xyzw=v.vertex.xzxz*_WaveScale/un..
分类:
编程语言 时间:
2014-10-20 02:17:24
阅读次数:
386
函数:绘制直线自由图形:beginShape(), vertex(), endShape() 分别是绘制图形开始,连接图形的节点,绘制结束 endShape(CLOSE)表示闭合图形。绘制曲线边框自由图形:beginShape() 开始绘制vertex() 图形起始端点bezierVertex(cx...
分类:
其他好文 时间:
2014-10-11 19:33:46
阅读次数:
205
题目:统计一个有向图中,给定起点不能到达的点。
分析:图论,搜索。直接利用dfs遍历即可。
说明:起始点开始属于未被遍历的点,注意初始化数据。
#include
#include
#include
using namespace std;
int maps[110][110];
int used[110];
void dfs(int s, int n)
{
for (int i...
分类:
其他好文 时间:
2014-10-07 12:31:53
阅读次数:
173