mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Added an optional (true by default) boolean argument to love.graphics.setBlendMode to specify whether alpha should be multiplied with rgb when blending.
Removed the 'premultiplied' blend mode, since setBlendMode("alpha", false) accomplishes the same thing now.
The 'multiply' blend mode is unaffected by the new flag, since fixed-function hardware blending can't do the equivalent of setBlendMode("multiply", true).
This commit is contained in:
@@ -232,12 +232,12 @@ public:
|
||||
/**
|
||||
* Sets the current blend mode.
|
||||
**/
|
||||
void setBlendMode(BlendMode mode);
|
||||
void setBlendMode(BlendMode mode, bool multiplyalpha);
|
||||
|
||||
/**
|
||||
* Gets the current blend mode.
|
||||
**/
|
||||
BlendMode getBlendMode() const;
|
||||
BlendMode getBlendMode(bool &multiplyalpha) const;
|
||||
|
||||
/**
|
||||
* Sets the default filter for images, canvases, and fonts.
|
||||
@@ -467,6 +467,7 @@ private:
|
||||
Color backgroundColor;
|
||||
|
||||
BlendMode blendMode;
|
||||
bool blendMultiplyAlpha;
|
||||
|
||||
float lineWidth;
|
||||
LineStyle lineStyle;
|
||||
|
||||
Reference in New Issue
Block a user