+ void SetIsAdvancedBlendEquationSupported(const bool isSupported)
+ {
+ mGlExtensionSupportedCacheList.MarkSupported(GlExtensionCache::GlExtensionCheckerType::BLEND_EQUATION_ADVANCED, isSupported);
+ }
+
+ bool IsAdvancedBlendEquationSupported()
+ {
+ ConditionalWait::ScopedLock lock(mContextCreatedWaitCondition);
+
+ const auto type = GlExtensionCache::GlExtensionCheckerType::BLEND_EQUATION_ADVANCED;
+ if(!mIsContextCreated && !mGlExtensionSupportedCacheList.IsCached(type))
+ {
+ mContextCreatedWaitCondition.Wait(lock);
+ }
+ return mGlExtensionSupportedCacheList.IsSupported(type);
+ }
+
+ void SetIsMultisampledRenderToTextureSupported(const bool isSupported)
+ {
+ mGlExtensionSupportedCacheList.MarkSupported(GlExtensionCache::GlExtensionCheckerType::MULTISAMPLED_RENDER_TO_TEXTURE, isSupported);
+ }
+
+ bool IsMultisampledRenderToTextureSupported()
+ {
+ ConditionalWait::ScopedLock lock(mContextCreatedWaitCondition);
+
+ const auto type = GlExtensionCache::GlExtensionCheckerType::MULTISAMPLED_RENDER_TO_TEXTURE;
+ if(!mIsContextCreated && !mGlExtensionSupportedCacheList.IsCached(type))
+ {
+ mContextCreatedWaitCondition.Wait(lock);
+ }
+ return mGlExtensionSupportedCacheList.IsSupported(type);
+ }
+
+ bool IsBlendEquationSupported(DevelBlendEquation::Type blendEquation)
+ {
+ switch(blendEquation)
+ {
+ case DevelBlendEquation::ADD:
+ case DevelBlendEquation::SUBTRACT:
+ case DevelBlendEquation::REVERSE_SUBTRACT:
+ {
+ return true;
+ }
+ case DevelBlendEquation::MIN:
+ case DevelBlendEquation::MAX:
+ {
+ return (GetGlesVersion() >= 30);
+ }
+ case DevelBlendEquation::MULTIPLY:
+ case DevelBlendEquation::SCREEN:
+ case DevelBlendEquation::OVERLAY:
+ case DevelBlendEquation::DARKEN:
+ case DevelBlendEquation::LIGHTEN:
+ case DevelBlendEquation::COLOR_DODGE:
+ case DevelBlendEquation::COLOR_BURN:
+ case DevelBlendEquation::HARD_LIGHT:
+ case DevelBlendEquation::SOFT_LIGHT:
+ case DevelBlendEquation::DIFFERENCE:
+ case DevelBlendEquation::EXCLUSION:
+ case DevelBlendEquation::HUE:
+ case DevelBlendEquation::SATURATION:
+ case DevelBlendEquation::COLOR:
+ case DevelBlendEquation::LUMINOSITY:
+ {
+ return IsAdvancedBlendEquationSupported();
+ }
+
+ default:
+ {
+ return false;
+ }
+ }
+
+ return false;
+ }
+
+ std::string GetShaderVersionPrefix()
+ {
+ if(mShaderVersionPrefix == "")
+ {
+ mShaderVersionPrefix = "#version " + std::to_string(GetShadingLanguageVersion());
+ if(GetShadingLanguageVersion() < 300)
+ {
+ mShaderVersionPrefix += "\n";
+ }
+ else
+ {
+ mShaderVersionPrefix += " es\n";
+ }
+ }
+ return mShaderVersionPrefix;
+ }
+
+ std::string GetVertexShaderPrefix()