Make logical more clearly

This commit is contained in:
halx99 2020-08-27 17:35:30 +08:00
parent 888020a27f
commit f36866a99b
1 changed files with 4 additions and 4 deletions

View File

@ -54,10 +54,10 @@ void RenderPipelineGL::updateBlendState(const BlendDescriptor& descriptor)
auto destinationRGBBlendFactor = UtilsGL::toGLBlendFactor(descriptor.destinationRGBBlendFactor); auto destinationRGBBlendFactor = UtilsGL::toGLBlendFactor(descriptor.destinationRGBBlendFactor);
auto sourceAlphaBlendFactor = UtilsGL::toGLBlendFactor(descriptor.sourceAlphaBlendFactor); auto sourceAlphaBlendFactor = UtilsGL::toGLBlendFactor(descriptor.sourceAlphaBlendFactor);
auto destinationAlphaBlendFactor = UtilsGL::toGLBlendFactor(descriptor.destinationAlphaBlendFactor); auto destinationAlphaBlendFactor = UtilsGL::toGLBlendFactor(descriptor.destinationAlphaBlendFactor);
GLboolean writeMaskRed = (GLboolean)((descriptor.writeMask & ColorWriteMask::RED) >> ColorWriteMask::RED_BIT); GLboolean writeMaskRed = _Bitmask_includes(descriptor.writeMask, ColorWriteMask::RED);
GLboolean writeMaskGreen = (GLboolean)((descriptor.writeMask & ColorWriteMask::GREEN) >> ColorWriteMask::GREEN_BIT); GLboolean writeMaskGreen = _Bitmask_includes(descriptor.writeMask, ColorWriteMask::GREEN);
GLboolean writeMaskBlue = (GLboolean)((descriptor.writeMask & ColorWriteMask::BLUE) >> ColorWriteMask::BLUE_BIT); GLboolean writeMaskBlue = _Bitmask_includes(descriptor.writeMask, ColorWriteMask::BLUE);
GLboolean writeMaskAlpha = (GLboolean)((descriptor.writeMask & ColorWriteMask::ALPHA) >> ColorWriteMask::ALPHA_BIT); GLboolean writeMaskAlpha = _Bitmask_includes(descriptor.writeMask, ColorWriteMask::ALPHA);
if (blendEnabled) if (blendEnabled)
{ {