2024-03-18 15:41:46 -03:00
|
|
|
#ifndef XNA_GRAPHICS_BLENDSTATE_HPP
|
|
|
|
#define XNA_GRAPHICS_BLENDSTATE_HPP
|
|
|
|
|
|
|
|
#include "../types.hpp"
|
|
|
|
#include "../forward.hpp"
|
|
|
|
#include "../enums.hpp"
|
|
|
|
|
|
|
|
namespace xna {
|
2024-03-21 16:01:47 -03:00
|
|
|
class IBlendState {
|
2024-03-18 15:41:46 -03:00
|
|
|
public:
|
2024-03-21 16:01:47 -03:00
|
|
|
virtual ~IBlendState(){}
|
2024-03-18 15:41:46 -03:00
|
|
|
|
2024-03-21 16:01:47 -03:00
|
|
|
static PBlendState Opaque();
|
|
|
|
static PBlendState AlphaBlend();
|
|
|
|
static PBlendState Additive();
|
|
|
|
static PBlendState NonPremultiplied();
|
|
|
|
|
|
|
|
virtual bool Apply(GraphicsDevice* device) = 0;
|
2024-03-18 15:41:46 -03:00
|
|
|
|
|
|
|
public:
|
|
|
|
bool _alphaToCoverage{ false };
|
|
|
|
bool _enabled{ true };
|
|
|
|
Blend _source{ Blend::SourceAlpha };
|
|
|
|
Blend _destination{ Blend::InverseSourceAlpha };
|
|
|
|
BlendOperation _operation{ BlendOperation::Add };
|
|
|
|
Blend _sourceAlpha{ Blend::One };
|
|
|
|
Blend _destinationAlpha{ Blend::Zero };
|
|
|
|
BlendOperation _operationAlpha{ BlendOperation::Add };
|
|
|
|
ColorWriteChannels _writeMask{ ColorWriteChannels::All };
|
2024-03-21 16:01:47 -03:00
|
|
|
};
|
2024-03-18 15:41:46 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|