
WebGL
文章平均质量分 61
神杀中龙
我需要自由的世界。
展开
-
WebGL基础库glMatrix0.9.5.js
/ glMatrix v0.9.5 glMatrixArrayType = typeof Float32Array != "undefined" ? Float32Array : typeof WebGLFloatArray != "undefined" ? WebGLFloatArray : Array; var vec3 = {}; vec3.create = function(转载 2014-10-15 18:06:58 · 2707 阅读 · 0 评论 -
WebGL增加顶点颜色
attribute vec3 v3Position; attribute vec3 av3Color; varying vec3 vv3Color; void main(void) { vv3Color = av3Color; gl_Position = vec4(v3Position, 1.0); } #ifdef GL_FRAGMENT_PREC转载 2014-10-15 18:26:18 · 1121 阅读 · 0 评论 -
glDrawArrays(int mode, int first,int count)
在OpenGl中所有的图形都是通过分解成三角形的方式进行绘制。 绘制图形通过GL10类中的glDrawArrays方法实现, 该方法原型: glDrawArrays(int mode, int first,int count) 参数1:有三种取值 1.GL_TRIANGLES:每三个顶之间绘制三角形,之间不连接 2.GL_转载 2014-10-15 18:08:55 · 1115 阅读 · 0 评论 -
WebGL之旋转三角形
02.WebGL之旋转三角形 attribute vec3 v3Position; attribute vec3 av3Color; varying vec3 vv3Color; attribute vec3 aVertexPosition; uniform mat4 um4Rotate; void main(void) { vv3Color = av3Color;转载 2014-10-17 14:55:44 · 1909 阅读 · 0 评论