2013-06-02 14:32:43 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* BlendState.h *
|
|
|
|
* *
|
2013-07-12 21:30:13 +02:00
|
|
|
* XFX::Graphics::BlendState class definition file *
|
2013-06-02 14:32:43 +02:00
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
|
|
*****************************************************************************/
|
2013-05-05 18:18:41 +02:00
|
|
|
#ifndef _XFX_GRAPHICS_BLENDSTATE_
|
|
|
|
#define _XFX_GRAPHICS_BLENDSTATE_
|
|
|
|
|
|
|
|
#include <Graphics/Color.h>
|
|
|
|
#include <Graphics/Enums.h>
|
|
|
|
#include <Graphics/GraphicsResource.h>
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
{
|
|
|
|
namespace Graphics
|
|
|
|
{
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Contains blend state for the device.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
class BlendState : public GraphicsResource
|
|
|
|
{
|
|
|
|
private:
|
2013-08-13 20:04:25 +02:00
|
|
|
static const String isBoundErrorString;
|
2013-05-05 18:18:41 +02:00
|
|
|
BlendFunction_t alphaBlendFunction;
|
|
|
|
Blend_t alphaDestinationBlend;
|
|
|
|
Blend_t alphaSourceBlend;
|
|
|
|
Color blendFactor;
|
|
|
|
BlendFunction_t colorBlendFunction;
|
|
|
|
Blend_t colorDestinationBlend;
|
|
|
|
Blend_t colorSourceBlend;
|
|
|
|
ColorWriteChannels_t colorWriteChannels;
|
|
|
|
ColorWriteChannels_t colorWriteChannels1;
|
|
|
|
ColorWriteChannels_t colorWriteChannels2;
|
|
|
|
ColorWriteChannels_t colorWriteChannels3;
|
|
|
|
bool isBound;
|
|
|
|
int multiSampleMask;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void Dispose(bool disposing);
|
|
|
|
|
|
|
|
public:
|
|
|
|
static const BlendState Additive;
|
|
|
|
static const BlendState AlphaBlend;
|
|
|
|
static const BlendState NonPremultiplied;
|
|
|
|
static const BlendState Opague;
|
|
|
|
|
|
|
|
BlendFunction_t getAlphaBlendFunction() const;
|
|
|
|
void setAlphaBlendFunction(BlendFunction_t value);
|
|
|
|
int getMultiSampleMask() const;
|
|
|
|
void setMultiSampleMask(int value);
|
|
|
|
|
|
|
|
BlendState();
|
|
|
|
~BlendState();
|
|
|
|
|
2013-07-12 21:30:13 +02:00
|
|
|
static const Type& GetType();
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
bool operator==(const BlendState& right) const;
|
|
|
|
bool operator!=(const BlendState& right) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_XFX_GRAPHICS_BLENDSTATE_
|