OpenGL3: Support min/max blend modes

This commit is contained in:
numzero
2023-04-20 17:44:14 +03:00
committed by sfan5
parent 81ad195aa3
commit 1f15fd0805
4 changed files with 15 additions and 0 deletions

View File

@ -1405,6 +1405,18 @@ COpenGL3DriverBase::~COpenGL3DriverBase()
case EBO_REVSUBTRACT:
CacheHandler->setBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
break;
case EBO_MIN:
if (BlendMinMaxSupported)
CacheHandler->setBlendEquation(GL_MIN);
else
os::Printer::log("Attempt to use EBO_MIN without driver support", ELL_WARNING);
break;
case EBO_MAX:
if (BlendMinMaxSupported)
CacheHandler->setBlendEquation(GL_MAX);
else
os::Printer::log("Attempt to use EBO_MAX without driver support", ELL_WARNING);
break;
default:
break;
}

View File

@ -166,6 +166,7 @@ namespace video
}
bool AnisotropicFilterSupported = false;
bool BlendMinMaxSupported = false;
private:
void addExtension(std::string name);