#ifndef _dmsTransparency_h_
#define _dmsTransparency_h_

#include <GL/gl.h>

namespace dms
{

class Transparency
    {
    public:
        Transparency(GLenum source=GL_ONE, GLenum dest=GL_ZERO,
                     GLenum func=GL_ALWAYS, GLclampf ref=0.0);
        void apply(void);
        void disable(void);
        
        void setBlend(GLenum source, GLenum dest);
        void setAlphaTest(GLenum func, GLclampf ref);
        void setNoBlend(void);
        void setNoAlphaTest(void);

        static Transparency StandardBlend;
        static Transparency AlphaTestZero;
        
    private:
        bool blend_, alphaTest_;
        GLenum blendSource_, blendDest_;
        GLenum alphaFunc_;
        GLclampf alphaRef_;
    };

}

#endif
