]> git.tdb.fi Git - libs/gl.git/blobdiff - source/blend.cpp
Remove non-OO access to blending
[libs/gl.git] / source / blend.cpp
index 8b82772fded1e7fc6acc755c312964ac867a0b3b..b2f59e17c5cb57250f20aba14ca158e81c818285 100644 (file)
@@ -38,34 +38,22 @@ void Blend::bind() const
        if(set_current(this))
        {
                glEnable(GL_BLEND);
-               // XXX Don't try to set equation if version < 1.2
-               glBlendEquation(eq);
+               if(glBlendEquation)
+                       glBlendEquation(eq);
                glBlendFunc(src_factor, dst_factor);
        }
 }
 
-const Blend &Blend::alpha()
-{
-       static Blend blend(SRC_ALPHA, ONE_MINUS_SRC_ALPHA);
-       return blend;
-}
-
 void Blend::unbind()
 {
        if(set_current(0))
                glDisable(GL_BLEND);
 }
 
-
-void blend_equation(BlendEquation eq)
-{
-       static RequireVersion _ver(1, 2);
-       glBlendEquation(eq);
-}
-
-void blend_func(BlendFactor src, BlendFactor dst)
+const Blend &Blend::alpha()
 {
-       glBlendFunc(src, dst);
+       static Blend blend(SRC_ALPHA, ONE_MINUS_SRC_ALPHA);
+       return blend;
 }
 
 } // namespace GL