2021年1月8日

glVertexAttribPointer

摘要: 解析顶点数据 例如: 1 2 glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), (void*)0); glEnableVertexAttribArray(0); glVertexAttribPointer函数的参数非 阅读全文

posted @ 2021-01-08 17:43 ZhYQ_note 阅读(310) 评论(0) 推荐(0)

glEnableVertexAttribArray 使用

摘要: const char *vertexShaderSource = "#version 330 core\n" "layout (location = 1) in vec3 aPos;\n" "void main()\n" "{\n" " gl_Position = vec4(aPos.x, aPos 阅读全文

posted @ 2021-01-08 17:02 ZhYQ_note 阅读(1141) 评论(0) 推荐(0)

导航