mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Avoid taking lock when not necessary
This commit is contained in:
parent
48071ed335
commit
7c9e7aa31a
@ -116,17 +116,18 @@ bool RenderTextureImplFBO::isAvailable()
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
unsigned int RenderTextureImplFBO::getMaximumAntialiasingLevel()
|
unsigned int RenderTextureImplFBO::getMaximumAntialiasingLevel()
|
||||||
{
|
{
|
||||||
|
#ifdef SFML_OPENGL_ES
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
const TransientContextLock lock;
|
const TransientContextLock lock;
|
||||||
|
GLint samples = 0;
|
||||||
GLint samples = 0; // NOLINT(misc-const-correctness)
|
|
||||||
|
|
||||||
#ifndef SFML_OPENGL_ES
|
|
||||||
|
|
||||||
glCheck(glGetIntegerv(GLEXT_GL_MAX_SAMPLES, &samples));
|
glCheck(glGetIntegerv(GLEXT_GL_MAX_SAMPLES, &samples));
|
||||||
|
return static_cast<unsigned int>(samples);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return static_cast<unsigned int>(samples);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user