X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fblend.h;h=3edebc8c7f4bdde90e8d7aa14c2ab87cc300ff04;hb=e1be82a4dfce8d90358c506f65be09da4dc9d5ec;hp=50ea13bd28a897bd6bc3fa491baffaeb66cb8ab4;hpb=11a5d4f2a35dfdcf61e16d4fcfba22e20ea6a3db;p=libs%2Fgl.git diff --git a/source/core/blend.h b/source/core/blend.h index 50ea13bd..3edebc8c 100644 --- a/source/core/blend.h +++ b/source/core/blend.h @@ -71,8 +71,17 @@ struct Blend Blend() = default; Blend(BlendFactor, BlendFactor); Blend(BlendEquation, BlendFactor, BlendFactor); + + bool operator==(const Blend &) const; + bool operator!=(const Blend &b) const { return !operator==(b); } }; +inline bool Blend::operator==(const Blend &other) const +{ + return enabled==other.enabled && equation==other.equation && src_factor==other.src_factor && + dst_factor==other.dst_factor && constant==other.constant && write_mask==other.write_mask; +} + inline ColorWriteMask operator|(ColorWriteMask m1, ColorWriteMask m2) { return static_cast(static_cast(m1)|static_cast(m2)); }