#ifndef BLENDMODE_H
#define BLENDMODE_H

namespace Salamander
{

/*
** BlendMode stores the source and destination effects used when rendering geometry. When pixels
** are drawn, their values are adjusted using the effects before being added together.
*/
class BlendMode
{
public:
	/*
	** These modes are common across most rendering platforms and fixed-function pipelines. If
	** modes are not available, then the client should fall back to the default rendering function.
	*/
	enum blendMode
	{
		Zero,
		One,
		SourceColour,
		OneMinusSourceColour,
		DestinationColour,
		OneMinusDestinationColour,
		SourceAlpha,
		OneMinusSourceAlpha,
		DestinationAlpha,
		OneMinusDestinationAlpha,
	};

public:
	/*
	** BlendModes must be created with a valid source and destination effect. The default
	** specifies standard blending where the source data completely replaces the destination
	** data.
	*/
	BlendMode(blendMode sourceMode      = SourceAlpha, 
			  blendMode destinationMode = OneMinusSourceAlpha);

	/*
	** Basic destructor.
	*/
	virtual ~BlendMode();

public:
	/*
	** Pixels from the rendered geometry are multiplied by this factor before being painted
	** on the background.
	*/
	blendMode sourceMode_;

	/*
	** Pixels from the background are multiplied by this factor before being combined with the 
	** rendered geometry.
	*/
	blendMode destinationMode_;
};

}

#endif // BLENDMODE_H