- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 73 73 calculations which logically belong in the fragment shader have been moved 74 74 into the vertex shader to improve performance. This is why the position 75 calculation is in a sep erate shader. Not only does it calculate the75 calculation is in a separate shader. Not only does it calculate the 76 76 position, but it also calculates some data to be passed to the fragment 77 77 shader as a varying. It is optimal to move as much of the calculation as … … 273 273 UntransformedPositionVertexShader, 274 274 PositionOnlyVertexShader, 275 ComplexGeometryPositionOnlyVertexShader, 275 276 PositionWithPatternBrushVertexShader, 276 277 PositionWithLinearGradientBrushVertexShader, … … 401 402 bool useTextureCoords; 402 403 bool useOpacityAttribute; 403 bool usePmvMatrix ;404 bool usePmvMatrixAttribute; 404 405 405 406 bool operator==(const QGLEngineShaderProg& other) { … … 447 448 BrushTransform, 448 449 BrushTexture, 450 Matrix, 449 451 NumUniforms 450 452 }; … … 456 458 }; 457 459 458 // There are optimi sations we can do, depending on the brush transform:460 // There are optimizations we can do, depending on the brush transform: 459 461 // 1) May not have to apply perspective-correction 460 462 // 2) Can use lower precision for matrix … … 475 477 void useSimpleProgram(); 476 478 void useBlitProgram(); 479 void setHasComplexGeometry(bool hasComplexGeometry) 480 { 481 complexGeometry = hasComplexGeometry; 482 shaderProgNeedsChanging = true; 483 } 484 bool hasComplexGeometry() const 485 { 486 return complexGeometry; 487 } 477 488 478 489 QGLShaderProgram* currentProgram(); // Returns pointer to the shader the manager has chosen … … 488 499 QGLContext* ctx; 489 500 bool shaderProgNeedsChanging; 501 bool complexGeometry; 490 502 491 503 // Current state variables which influence the choice of shader:
Note:
See TracChangeset
for help on using the changeset viewer.