From 314b0e75bdcd9579149364d9ec76fc1591736f32 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 15 Jan 2014 11:46:57 +0100 Subject: Make multisampling and defaultSurfaceFormat opt-in Change-Id: I13922fb3367ab1ac427e3b874147fbfcaa45227b Reviewed-by: Gunnar Sletta --- customcontext/context.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'customcontext/context.cpp') diff --git a/customcontext/context.cpp b/customcontext/context.cpp index c6ff7db..45cce7f 100644 --- a/customcontext/context.cpp +++ b/customcontext/context.cpp @@ -91,7 +91,7 @@ Context::Context(QObject *parent) , m_sampleCount(0) , m_useMultisampling(false) { - m_useMultisampling = qgetenv("CUSTOMCONTEXT_NO_MULTISAMPLE").isEmpty(); + m_useMultisampling = !qgetenv("CUSTOMCONTEXT_MULTISAMPLE").isEmpty(); if (m_useMultisampling) { m_sampleCount= 16; QByteArray overrideSamples = qgetenv("CUSTOMCONTEXT_MULTISAMPLE_COUNT"); @@ -312,7 +312,7 @@ void Context::invalidate() } - +#ifdef CUSTOMCONTEXT_SURFACEFORMAT QSurfaceFormat Context::defaultSurfaceFormat() const { QSurfaceFormat format; @@ -323,6 +323,7 @@ QSurfaceFormat Context::defaultSurfaceFormat() const format.setSamples(m_sampleCount); return format; } +#endif -- cgit v1.2.3