X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fblend.cpp;h=184d5ad534f1aca6bcf441726b54e8c80af94a1b;hb=3b159edbe4e80a2bc19c4c2fcd42cb996b9fbfe0;hp=03fc0f02baf32c917e1be36ad9ec33f7237f9233;hpb=f14435e58bfa0fa697a06ba9a454bb30cd37d9d8;p=libs%2Fgl.git diff --git a/source/blend.cpp b/source/blend.cpp index 03fc0f02..184d5ad5 100644 --- a/source/blend.cpp +++ b/source/blend.cpp @@ -1,6 +1,6 @@ +#include +#include #include "blend.h" -#include "extension.h" -#include "version_1_2.h" namespace Msp { namespace GL { @@ -22,8 +22,10 @@ Blend::Blend(BlendEquation e, BlendFactor sf, BlendFactor df): src_factor(sf), dst_factor(df) { - if(eq!=ADD) - static RequireVersion _ver(1, 2); + if(eq==MIN || eq==MAX) + static Require _req(EXT_blend_minmax); + else if(eq==SUBTRACT || eq==REVERSE_SUBTRACT) + static Require _req(EXT_blend_subtract); } void Blend::bind() const @@ -31,7 +33,7 @@ void Blend::bind() const if(set_current(this)) { glEnable(GL_BLEND); - if(glBlendEquation) + if(EXT_blend_minmax) glBlendEquation(eq); glBlendFunc(src_factor, dst_factor); }