Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/opengl/gl2paintengineex/qglengineshadermanager_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    7373    calculations which logically belong in the fragment shader have been moved
    7474    into the vertex shader to improve performance. This is why the position
    75     calculation is in a seperate shader. Not only does it calculate the
     75    calculation is in a separate shader. Not only does it calculate the
    7676    position, but it also calculates some data to be passed to the fragment
    7777    shader as a varying. It is optimal to move as much of the calculation as
     
    273273        UntransformedPositionVertexShader,
    274274        PositionOnlyVertexShader,
     275        ComplexGeometryPositionOnlyVertexShader,
    275276        PositionWithPatternBrushVertexShader,
    276277        PositionWithLinearGradientBrushVertexShader,
     
    401402    bool                useTextureCoords;
    402403    bool                useOpacityAttribute;
    403     bool                usePmvMatrix;
     404    bool                usePmvMatrixAttribute;
    404405
    405406    bool operator==(const QGLEngineShaderProg& other) {
     
    447448        BrushTransform,
    448449        BrushTexture,
     450        Matrix,
    449451        NumUniforms
    450452    };
     
    456458    };
    457459
    458     // There are optimisations we can do, depending on the brush transform:
     460    // There are optimizations we can do, depending on the brush transform:
    459461    //    1) May not have to apply perspective-correction
    460462    //    2) Can use lower precision for matrix
     
    475477    void useSimpleProgram();
    476478    void useBlitProgram();
     479    void setHasComplexGeometry(bool hasComplexGeometry)
     480    {
     481        complexGeometry = hasComplexGeometry;
     482        shaderProgNeedsChanging = true;
     483    }
     484    bool hasComplexGeometry() const
     485    {
     486        return complexGeometry;
     487    }
    477488
    478489    QGLShaderProgram* currentProgram(); // Returns pointer to the shader the manager has chosen
     
    488499    QGLContext*     ctx;
    489500    bool            shaderProgNeedsChanging;
     501    bool            complexGeometry;
    490502
    491503    // Current state variables which influence the choice of shader:
Note: See TracChangeset for help on using the changeset viewer.