OpenGLShader 编程系列- glUniform*的使用

    //------------gluniform------------------
    glUniform2f(location, 1.0f, 0.0f);
    glUniform2i(location, 1, 0);
    
    GLfloat coord[4] = {1.0f, 0.75f, 0.25f, 0.0f};
    glUniform4fv(location, coord);
    glUniform4f(location, coord[0], coord[1], coord[2], coord[3]);
    glUniform1f(location, -0.7f);
    glUniform1i(location, 0);

你可能感兴趣的:(OpenGL,专栏)