diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2012-06-29 17:14:10 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-13 11:25:25 +0200 |
commit | d83eb21fb296b73bd111d907dfb9ecde373b9bb3 (patch) | |
tree | fbe6b8be85e5a52094a310a72fe5575b7e4131ee /src/quick/scenegraph/util/qsgtexturematerial.cpp | |
parent | 60a13ee3fd021080d92a11b3456602103ad61a79 (diff) |
Change antialiasing method for QML2.
Since multisampling can require a lot of memory, and might not
be supported on some hardware, turn off multisampling and
implement antialiasing in the vertex shader instead. The
alternative method of antialiasing is implemented for Rectangle,
Image, BorderImage and AnimatedImage, and must be explicitly
enabled by setting the new antialiasing property.
Task-number: QTBUG-26268
Change-Id: I39a93d978658a494bf51e9f0fd02d8414eb8be12
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/quick/scenegraph/util/qsgtexturematerial.cpp')
-rw-r--r-- | src/quick/scenegraph/util/qsgtexturematerial.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp index 7f461bb72d..cdbef7d88f 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial.cpp +++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp @@ -355,19 +355,6 @@ static const char qt_scenegraph_texture_material_opacity_fragment[] = " gl_FragColor = texture2D(qt_Texture, qt_TexCoord) * opacity; \n" "}"; -class QSGTextureMaterialShader : public QSGOpaqueTextureMaterialShader -{ -public: - virtual void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect); - virtual void initialize(); - - static QSGMaterialType type; - -protected: - virtual const char *fragmentShader() const { return qt_scenegraph_texture_material_opacity_fragment; } - - int m_opacity_id; -}; QSGMaterialType QSGTextureMaterialShader::type; @@ -407,4 +394,9 @@ void QSGTextureMaterialShader::initialize() m_opacity_id = program()->uniformLocation("opacity"); } +const char *QSGTextureMaterialShader::fragmentShader() const +{ + return qt_scenegraph_texture_material_opacity_fragment; +} + QT_END_NAMESPACE |