Check availability of color buffer float extension in GLES renderer

This commit is contained in:
Deve 2016-09-17 01:37:44 +02:00
parent d05cff09c8
commit 21d62ed405
4 changed files with 17 additions and 1 deletions

View File

@ -52,6 +52,7 @@ void CentralVideoSettings::init()
#if defined(USE_GLES2)
hasBGRA = false;
hasColorBufferFloat = false;
#endif
m_GI_has_artifact = false;
@ -230,7 +231,13 @@ void CentralVideoSettings::init()
hasBGRA = true;
Log::info("GLDriver", "EXT texture format BGRA8888 Present");
}
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_COLOR_BUFFER_FLOAT) &&
hasGLExtension("GL_EXT_color_buffer_float"))
{
hasColorBufferFloat = true;
Log::info("GLDriver", "EXT Color Buffer Float Present");
}
#endif
}
}
@ -355,6 +362,11 @@ bool CentralVideoSettings::isEXTTextureFormatBGRA8888Usable() const
{
return hasBGRA;
}
bool CentralVideoSettings::isEXTColorBufferFloatUsable() const
{
return hasColorBufferFloat;
}
#endif
bool CentralVideoSettings::supportsShadows() const

View File

@ -45,6 +45,7 @@ private:
#if defined(USE_GLES2)
bool hasBGRA;
bool hasColorBufferFloat;
#endif
bool m_need_rh_workaround;
@ -82,6 +83,7 @@ public:
#if defined(USE_GLES2)
bool isEXTTextureFormatBGRA8888Usable() const;
bool isEXTColorBufferFloatUsable() const;
#endif

View File

@ -59,6 +59,7 @@ namespace GraphicsRestrictions
"ExplicitAttribLocation",
#if defined(USE_GLES2)
"TextureFormatBGRA8888",
"ColorBufferFloat",
#endif
"DriverRecentEnough",
"HighDefinitionTextures",

View File

@ -53,6 +53,7 @@ namespace GraphicsRestrictions
GR_EXPLICIT_ATTRIB_LOCATION,
#if defined(USE_GLES2)
GR_TEXTURE_FORMAT_BGRA8888,
GR_COLOR_BUFFER_FLOAT,
#endif
GR_DRIVER_RECENT_ENOUGH,
GR_HIGHDEFINITION_TEXTURES,