All pastes #2056894 Raw Edit

Something

public text v1 · immutable
#2056894 ·published 2011-05-11 16:32 UTC
rendered paste body
    programObject_ = new QGLShaderProgram();
    qDebug() << "vertex shader compiled:" << programObject_->addShaderFromSourceFile(QGLShader::Vertex, ":vertexshader.txt");
    qDebug() << "fragment shader compiled:" << programObject_->addShaderFromSourceFile(QGLShader::Fragment, ":fragmentshader.txt");

    QMatrix4x4 modelView;
    modelView.setToIdentity();

    glBindAttribLocation(programObject_->programId(), 0, "v_modelView");
    glBindAttribLocation(programObject_->programId(), 1, "v_position");

    bool linkSuccess = programObject_->link();