Add blend modes to renderer.
This commit is contained in:
@@ -2,6 +2,38 @@ using System.Numerics;
|
||||
|
||||
namespace Voile.Rendering
|
||||
{
|
||||
public enum BlendMode
|
||||
{
|
||||
//
|
||||
// Summary:
|
||||
// Blend textures considering alpha (default)
|
||||
BlendAlpha,
|
||||
//
|
||||
// Summary:
|
||||
// Blend textures adding colors
|
||||
BlendAdditive,
|
||||
//
|
||||
// Summary:
|
||||
// Blend textures multiplying colors
|
||||
BlendMultiplied,
|
||||
//
|
||||
// Summary:
|
||||
// Blend textures adding colors (alternative)
|
||||
BlendAdd,
|
||||
//
|
||||
// Summary:
|
||||
// Blend textures subtracting colors (alternative)
|
||||
BlendSubtract,
|
||||
//
|
||||
// Summary:
|
||||
// Blend premultiplied textures considering alpha
|
||||
BlendAlphaPremul,
|
||||
//
|
||||
// Summary:
|
||||
// Blend textures using custom src/dst factors (use rlSetBlendMode())
|
||||
BlendCustom
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An abstract class representing the graphics renderer.
|
||||
/// </summary>
|
||||
@@ -82,6 +114,9 @@ namespace Voile.Rendering
|
||||
/// </summary>
|
||||
public abstract void EndFrame();
|
||||
|
||||
public abstract void BeginBlended(BlendMode blendMode);
|
||||
public abstract void EndBlended();
|
||||
|
||||
public abstract void BeginCamera2d(Vector2 offset, Vector2 target, float rotation, float zoom);
|
||||
public abstract void EndCamera2d();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user