mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Don't enable/disable non-existant GL_FRAMEBUFFER_SRGB on OpenGL ES.
This commit is contained in:
parent
5b60905689
commit
2495a9ba67
@ -655,6 +655,9 @@ void RenderTarget::applyShader(const Shader* shader)
|
||||
////////////////////////////////////////////////////////////
|
||||
void RenderTarget::setupDraw(bool useVertexCache, const RenderStates& states)
|
||||
{
|
||||
// GL_FRAMEBUFFER_SRGB is not available on OpenGL ES
|
||||
// If a framebuffer supports sRGB, it will always be enabled on OpenGL ES
|
||||
#ifndef SFML_OPENGL_ES
|
||||
// Enable or disable sRGB encoding
|
||||
// This is needed for drivers that do not check the format of the surface drawn to before applying sRGB conversion
|
||||
if (!m_cache.enable)
|
||||
@ -664,6 +667,7 @@ void RenderTarget::setupDraw(bool useVertexCache, const RenderStates& states)
|
||||
else
|
||||
glCheck(glDisable(GL_FRAMEBUFFER_SRGB));
|
||||
}
|
||||
#endif
|
||||
|
||||
// First set the persistent OpenGL states if it's the very first call
|
||||
if (!m_cache.glStatesSet)
|
||||
|
Loading…
Reference in New Issue
Block a user