0
我想绘制尽可能多的金字塔来填补空间。我可以画一个金字塔,改变它的颜色等。但是,现在,我想绘制很多可以填满屏幕的金字塔。我想要使用一组顶点和索引。 顶点和索引与颜色信息如下:绘图opengl中的多个相同的金字塔ES 2.0
const Vertex Vertices [] = {
{{-1, -1, -1}, {1, 0, 0, 1}},
{{1, -1, -1}, {1, 0, 0, 1}},
{{1, -1, 1}, {1, 0, 0, 1}},
{{-1, -1, 1}, {1, 0, 0, 1}},
{{0, 1, 0}, {1, 0, 0, 1}}
};
const GLubyte Indices[] = {
2, 4, 3,
1, 4, 2,
0, 4, 1,
4, 0, 3
};
任何人可以帮助我的代码,我知道我做了一些错误。
http://nukecode.blogspot.de/2011/工作07 /几何instancig换iphone-wip.html – 2013-05-07 13:46:30