Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/opengl/qglshaderprogram.cpp

    r651 r769  
    970970    is linked will be assigned locations automatically.
    971971
     972    When this function is called after the program has been linked,
     973    the program will need to be relinked for the change to take effect.
     974
    972975    \sa attributeLocation()
    973976*/
     
    975978{
    976979    Q_D(QGLShaderProgram);
    977     if (!d->linked) {
    978         glBindAttribLocation(d->programGuard.id(), location, name);
    979     } else {
    980         qWarning() << "QGLShaderProgram::bindAttributeLocation(" << name
    981                    << "): cannot bind after shader program is linked";
    982     }
     980    if (!init())
     981        return;
     982    glBindAttribLocation(d->programGuard.id(), location, name);
     983    d->linked = false;  // Program needs to be relinked.
    983984}
    984985
     
    991992    is linked will be assigned locations automatically.
    992993
     994    When this function is called after the program has been linked,
     995    the program will need to be relinked for the change to take effect.
     996
    993997    \sa attributeLocation()
    994998*/
     
    10051009    Any attributes that have not been explicitly bound when the program
    10061010    is linked will be assigned locations automatically.
     1011
     1012    When this function is called after the program has been linked,
     1013    the program will need to be relinked for the change to take effect.
    10071014
    10081015    \sa attributeLocation()
Note: See TracChangeset for help on using the changeset viewer.