From 2d67bf07fee5e0ad65b89030a440a3b73cb1d3d3 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 4 Feb 2014 13:04:38 +0100 Subject: Do not query max samples on gles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Querying GL_MAX_SAMPLES is not supported in GLES2. Avoiding the call also makes us play nice with Mesa in debug mode since it gets rid of the warnings about the failing glGetIntegerv call. Change-Id: I05e501cc11af41a54fefc34ab919c5191e4f3f0a Reviewed-by: Jørgen Lind Reviewed-by: Gunnar Sletta --- src/gui/opengl/qopenglframebufferobject.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/opengl/qopenglframebufferobject.cpp') diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index c06ba40b47..14d7fac9f7 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -432,9 +432,11 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi samples = 0; } +#ifndef QT_OPENGL_ES_2 GLint maxSamples; glGetIntegerv(GL_MAX_SAMPLES, &maxSamples); samples = qBound(0, int(samples), int(maxSamples)); +#endif size = sz; target = texture_target; -- cgit v1.2.3