diff --git a/internal/graphicsdriver/compositemode.go b/internal/graphicsdriver/compositemode.go index 9c7a406f9..c45fccedd 100644 --- a/internal/graphicsdriver/compositemode.go +++ b/internal/graphicsdriver/compositemode.go @@ -45,17 +45,17 @@ type BlendFactor int const ( BlendFactorZero BlendFactor = iota BlendFactorOne - BlendFactorSrcAlpha - BlendFactorDstAlpha - BlendFactorOneMinusSrcAlpha - BlendFactorOneMinusDstAlpha - BlendFactorDstColor + BlendFactorSourceAlpha + BlendFactorDestinationAlpha + BlendFactorOneMinusSourceAlpha + BlendFactorOneMinusDestinationAlpha + BlendFactorDestinationColor ) func (c CompositeMode) BlendFactors() (src BlendFactor, dst BlendFactor) { switch c { case CompositeModeSourceOver: - return BlendFactorOne, BlendFactorOneMinusSrcAlpha + return BlendFactorOne, BlendFactorOneMinusSourceAlpha case CompositeModeClear: return BlendFactorZero, BlendFactorZero case CompositeModeCopy: @@ -63,25 +63,25 @@ func (c CompositeMode) BlendFactors() (src BlendFactor, dst BlendFactor) { case CompositeModeDestination: return BlendFactorZero, BlendFactorOne case CompositeModeDestinationOver: - return BlendFactorOneMinusDstAlpha, BlendFactorOne + return BlendFactorOneMinusDestinationAlpha, BlendFactorOne case CompositeModeSourceIn: - return BlendFactorDstAlpha, BlendFactorZero + return BlendFactorDestinationAlpha, BlendFactorZero case CompositeModeDestinationIn: - return BlendFactorZero, BlendFactorSrcAlpha + return BlendFactorZero, BlendFactorSourceAlpha case CompositeModeSourceOut: - return BlendFactorOneMinusDstAlpha, BlendFactorZero + return BlendFactorOneMinusDestinationAlpha, BlendFactorZero case CompositeModeDestinationOut: - return BlendFactorZero, BlendFactorOneMinusSrcAlpha + return BlendFactorZero, BlendFactorOneMinusSourceAlpha case CompositeModeSourceAtop: - return BlendFactorDstAlpha, BlendFactorOneMinusSrcAlpha + return BlendFactorDestinationAlpha, BlendFactorOneMinusSourceAlpha case CompositeModeDestinationAtop: - return BlendFactorOneMinusDstAlpha, BlendFactorSrcAlpha + return BlendFactorOneMinusDestinationAlpha, BlendFactorSourceAlpha case CompositeModeXor: - return BlendFactorOneMinusDstAlpha, BlendFactorOneMinusSrcAlpha + return BlendFactorOneMinusDestinationAlpha, BlendFactorOneMinusSourceAlpha case CompositeModeLighter: return BlendFactorOne, BlendFactorOne case CompositeModeMultiply: - return BlendFactorDstColor, BlendFactorZero + return BlendFactorDestinationColor, BlendFactorZero default: panic(fmt.Sprintf("graphicsdriver: invalid composite mode: %d", c)) } diff --git a/internal/graphicsdriver/directx/pipeline_windows.go b/internal/graphicsdriver/directx/pipeline_windows.go index e42f609c3..15e7a6a8e 100644 --- a/internal/graphicsdriver/directx/pipeline_windows.go +++ b/internal/graphicsdriver/directx/pipeline_windows.go @@ -31,15 +31,15 @@ func blendFactorToBlend(c graphicsdriver.BlendFactor, alpha bool) _D3D12_BLEND { return _D3D12_BLEND_ZERO case graphicsdriver.BlendFactorOne: return _D3D12_BLEND_ONE - case graphicsdriver.BlendFactorSrcAlpha: + case graphicsdriver.BlendFactorSourceAlpha: return _D3D12_BLEND_SRC_ALPHA - case graphicsdriver.BlendFactorDstAlpha: + case graphicsdriver.BlendFactorDestinationAlpha: return _D3D12_BLEND_DEST_ALPHA - case graphicsdriver.BlendFactorOneMinusSrcAlpha: + case graphicsdriver.BlendFactorOneMinusSourceAlpha: return _D3D12_BLEND_INV_SRC_ALPHA - case graphicsdriver.BlendFactorOneMinusDstAlpha: + case graphicsdriver.BlendFactorOneMinusDestinationAlpha: return _D3D12_BLEND_INV_DEST_ALPHA - case graphicsdriver.BlendFactorDstColor: + case graphicsdriver.BlendFactorDestinationColor: if alpha { return _D3D12_BLEND_DEST_ALPHA } diff --git a/internal/graphicsdriver/metal/graphics_darwin.go b/internal/graphicsdriver/metal/graphics_darwin.go index c93d23620..44db1b693 100644 --- a/internal/graphicsdriver/metal/graphics_darwin.go +++ b/internal/graphicsdriver/metal/graphics_darwin.go @@ -306,15 +306,15 @@ func blendFactorToMetalBlendFactor(c graphicsdriver.BlendFactor) mtl.BlendFactor return mtl.BlendFactorZero case graphicsdriver.BlendFactorOne: return mtl.BlendFactorOne - case graphicsdriver.BlendFactorSrcAlpha: + case graphicsdriver.BlendFactorSourceAlpha: return mtl.BlendFactorSourceAlpha - case graphicsdriver.BlendFactorDstAlpha: + case graphicsdriver.BlendFactorDestinationAlpha: return mtl.BlendFactorDestinationAlpha - case graphicsdriver.BlendFactorOneMinusSrcAlpha: + case graphicsdriver.BlendFactorOneMinusSourceAlpha: return mtl.BlendFactorOneMinusSourceAlpha - case graphicsdriver.BlendFactorOneMinusDstAlpha: + case graphicsdriver.BlendFactorOneMinusDestinationAlpha: return mtl.BlendFactorOneMinusDestinationAlpha - case graphicsdriver.BlendFactorDstColor: + case graphicsdriver.BlendFactorDestinationColor: return mtl.BlendFactorDestinationColor default: panic(fmt.Sprintf("metal: invalid operation: %d", c)) diff --git a/internal/graphicsdriver/opengl/context.go b/internal/graphicsdriver/opengl/context.go index 1898c5c75..c36779759 100644 --- a/internal/graphicsdriver/opengl/context.go +++ b/internal/graphicsdriver/opengl/context.go @@ -29,15 +29,15 @@ func convertBlendFactor(op graphicsdriver.BlendFactor) blendFactor { return zero case graphicsdriver.BlendFactorOne: return one - case graphicsdriver.BlendFactorSrcAlpha: + case graphicsdriver.BlendFactorSourceAlpha: return srcAlpha - case graphicsdriver.BlendFactorDstAlpha: + case graphicsdriver.BlendFactorDestinationAlpha: return dstAlpha - case graphicsdriver.BlendFactorOneMinusSrcAlpha: + case graphicsdriver.BlendFactorOneMinusSourceAlpha: return oneMinusSrcAlpha - case graphicsdriver.BlendFactorOneMinusDstAlpha: + case graphicsdriver.BlendFactorOneMinusDestinationAlpha: return oneMinusDstAlpha - case graphicsdriver.BlendFactorDstColor: + case graphicsdriver.BlendFactorDestinationColor: return dstColor default: panic(fmt.Sprintf("opengl: invalid blend factor %d at convertBlendFactor", op))