summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2010-12-14 15:29:28 +0100
committerGunnar Sletta <gunnar.sletta@nokia.com>2010-12-14 15:29:28 +0100
commit81b5d2155dcb742d37def03de427d9af454c9d19 (patch)
treed160ca2726aa9bf4131a65ae9d5179f0f7442a77
parentac7970d08b604ef38b3816846bc053303b1cf21c (diff)
silence some valgrind warnings
-rw-r--r--src/effects/shadereffectitem.cpp9
-rw-r--r--src/effects/shadereffectitem.h1
2 files changed, 7 insertions, 3 deletions
diff --git a/src/effects/shadereffectitem.cpp b/src/effects/shadereffectitem.cpp
index 60af776..fe53cb9 100644
--- a/src/effects/shadereffectitem.cpp
+++ b/src/effects/shadereffectitem.cpp
@@ -188,6 +188,8 @@ ShaderEffectSource::ShaderEffectSource(QObject *parent)
, m_refs(0)
, m_dirtyTexture(true)
, m_dirtySceneGraph(true)
+ , m_multisamplingSupported(false)
+ , m_checkedForMultisamplingSupport(false)
{
m_context = QSGContext::current;
}
@@ -404,11 +406,12 @@ void ShaderEffectSource::update()
Q_ASSERT(m_renderer);
const QGLContext *ctx = m_context->glContext();
- if (m_renderer->openGLFeatures() == 0) {
- m_renderer->initializeGLFunctions(ctx);
+
+ if (!m_checkedForMultisamplingSupport) {
QList<QByteArray> extensions = QByteArray((const char *)glGetString(GL_EXTENSIONS)).split(' ');
m_multisamplingSupported = extensions.contains("GL_EXT_framebuffer_multisample")
- && extensions.contains("GL_EXT_framebuffer_blit");
+ && extensions.contains("GL_EXT_framebuffer_blit");
+ m_checkedForMultisamplingSupport = true;
}
if (!m_fbo) {
diff --git a/src/effects/shadereffectitem.h b/src/effects/shadereffectitem.h
index a1db89a..6fd7415 100644
--- a/src/effects/shadereffectitem.h
+++ b/src/effects/shadereffectitem.h
@@ -175,6 +175,7 @@ private:
uint m_dirtyTexture : 1; // Causes update no matter what.
uint m_dirtySceneGraph : 1; // Causes update if not static.
uint m_multisamplingSupported : 1;
+ uint m_checkedForMultisamplingSupport : 1;
};
class ShaderEffectNode : public GeometryNode