diff --git a/src/SFML/Graphics/RenderTextureImplFBO.cpp b/src/SFML/Graphics/RenderTextureImplFBO.cpp index 804a1b3d2..5dc03b214 100644 --- a/src/SFML/Graphics/RenderTextureImplFBO.cpp +++ b/src/SFML/Graphics/RenderTextureImplFBO.cpp @@ -116,17 +116,18 @@ bool RenderTextureImplFBO::isAvailable() //////////////////////////////////////////////////////////// unsigned int RenderTextureImplFBO::getMaximumAntialiasingLevel() { +#ifdef SFML_OPENGL_ES + + return 0; + +#else + const TransientContextLock lock; - - GLint samples = 0; // NOLINT(misc-const-correctness) - -#ifndef SFML_OPENGL_ES - + GLint samples = 0; glCheck(glGetIntegerv(GLEXT_GL_MAX_SAMPLES, &samples)); + return static_cast(samples); #endif - - return static_cast(samples); }