forked from ZaneDubya/YCPU
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extending effect state with rasterizer.
- Loading branch information
Showing
4 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
23 changes: 18 additions & 5 deletions
23
Source/Libraries/YpsilonFramework/Core/Graphics/EffectState.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,33 @@ | ||
using Microsoft.Xna.Framework.Graphics; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace Ypsilon.Core.Graphics | ||
{ | ||
public class EffectState | ||
{ | ||
public readonly Effect Effect; | ||
public readonly SamplerState Sampler; | ||
public readonly RasterizerState Raster; | ||
public readonly bool TextureOverride; | ||
public readonly DepthStencilState stencil; | ||
|
||
public EffectState(Effect effect, SamplerState sampler) | ||
public EffectState(Effect effect, SamplerState sampler, RasterizerState raster, DepthStencilState stencil, bool texture) | ||
{ | ||
Effect = effect; | ||
Sampler = sampler; | ||
Raster = raster; | ||
TextureOverride = texture; | ||
} | ||
|
||
public EffectState(Effect effect, SamplerState sampler, RasterizerState raster) | ||
: this(effect, sampler, raster, DepthStencilState.Default, false) | ||
{ | ||
|
||
} | ||
|
||
public EffectState(Effect effect, SamplerState sample) | ||
: this(effect, sample, RasterizerState.CullNone, DepthStencilState.Default, false) | ||
{ | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters