Do not query max samples on gles

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 <jorgen.lind@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This commit is contained in:
Laszlo Agocs 2014-02-04 13:04:38 +01:00 committed by The Qt Project
parent 760ad40700
commit 2d67bf07fe

View File

@ -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;