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:
parent
760ad40700
commit
2d67bf07fe
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user