摘要: 纹理坐标作为属性传递到顶点着色器texture是OPENGL对象,包含一张或多张相同格式的图片。它有2中用途:the source of a texture access from aShaderbe used as a render target. 阅读全文
posted @ 2013-06-16 23:32 Kalou 阅读(1526) 评论(0) 推荐(0) 编辑
摘要: 用户定义的属性变量都是全局变量,与OpenGL应用程序传递给在OpenGL实现内部执行的顶点着色器的值相关联1.获取位置索引GLintglGetAttribLocation (GLuint program, const GLchar* name)2.显式设置属性voidglBindAttribLocation (GLuint program, GLuint index, const GLchar* name)必须在着色器程序被链接之前执行3.设置属性voidglVertexAttrib{1234}f (GLuint indx, TYPE value)voidglVertexAttrib{123 阅读全文
posted @ 2013-06-16 01:30 Kalou 阅读(963) 评论(0) 推荐(0) 编辑