2024-03-18 15:41:46 -03:00
|
|
|
#ifndef XNA_GRAPHICS_BLENDSTATE_HPP
|
|
|
|
#define XNA_GRAPHICS_BLENDSTATE_HPP
|
|
|
|
|
2024-04-13 21:04:12 -03:00
|
|
|
#include "../default.hpp"
|
2024-05-19 21:22:34 -03:00
|
|
|
#include "gresource.hpp"
|
2024-03-18 15:41:46 -03:00
|
|
|
|
|
|
|
namespace xna {
|
2024-04-24 11:44:41 -03:00
|
|
|
struct BlendRenderTarget;
|
2024-03-24 16:12:17 -03:00
|
|
|
|
2024-05-19 21:22:34 -03:00
|
|
|
class BlendState : public GraphicsResource {
|
2024-03-18 15:41:46 -03:00
|
|
|
public:
|
2024-05-19 21:22:34 -03:00
|
|
|
BlendState();
|
|
|
|
BlendState(sptr<GraphicsDevice> const& device);
|
2024-05-23 09:46:11 -03:00
|
|
|
~BlendState() override;
|
2024-05-19 21:22:34 -03:00
|
|
|
bool Initialize(xna_error_nullarg) ;
|
|
|
|
void AlphaToCoverageEnable(bool value) ;
|
|
|
|
void IndependentBlendEnable(bool value) ;
|
|
|
|
void RenderTargets(std::vector<BlendRenderTarget> const& value);
|
|
|
|
bool Apply(xna_error_nullarg);
|
2024-04-13 21:04:12 -03:00
|
|
|
|
2024-05-19 21:22:34 -03:00
|
|
|
static uptr<BlendState> Opaque();
|
|
|
|
static uptr<BlendState> AlphaBlend();
|
|
|
|
static uptr<BlendState> Additive();
|
|
|
|
static uptr<BlendState> NonPremultiplied();
|
|
|
|
|
|
|
|
public:
|
|
|
|
struct PlatformImplementation;
|
|
|
|
uptr<PlatformImplementation> impl = nullptr;
|
2024-03-21 16:01:47 -03:00
|
|
|
};
|
2024-03-18 15:41:46 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|