十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
1,
GLuint ShaderProgram = glCreateProgram();
GLuint ShaderObj = glCreateShader(ShaderType);
glShaderSource(ShaderObj, 1, p, Lengths);
glCompileShader(ShaderObj);
glAttachShader(ShaderProgram, ShaderObj);
glLinkProgram(ShaderProgram);
glUseProgram(ShaderProgram);
glDeleteShader(*iter);
glDeleteProgram(ShaderProgram);
2,
3,
4,
glUseProgram(ShaderProgram);
gScaleLocation = glGetUniformLocation(ShaderProgram, "gScale");
assert(gScaleLocation != 0xFFFFFFFF);
}
Sin(Scale)值在-1到1之间摆动,Position.x, Position.y在[-1,1]缩放,可以看三角形缩放和上下左右摆动。
应为左右两点对称的只能看见左右缩放看不出来左右摆动。