anx.framework/ANX.Framework/Graphics/RenderTargetBinding.cs

54 lines
1.3 KiB
C#
Raw Normal View History

2011-10-31 05:36:24 +00:00
using System;
using ANX.Framework.NonXNA.Development;
2011-10-31 05:36:24 +00:00
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
2011-10-31 05:36:24 +00:00
namespace ANX.Framework.Graphics
{
[PercentageComplete(100)]
2011-10-31 05:36:24 +00:00
public struct RenderTargetBinding
{
#region Private
private Texture renderTarget;
private CubeMapFace cubeMapFace;
#endregion
#region Public
public Texture RenderTarget
{
get
{
return this.renderTarget;
}
}
public CubeMapFace CubeMapFace
{
get
{
return this.cubeMapFace;
}
}
#endregion
2011-10-31 05:36:24 +00:00
public RenderTargetBinding(RenderTarget2D renderTarget)
{
this.renderTarget = renderTarget;
this.cubeMapFace = Graphics.CubeMapFace.PositiveX;
}
public RenderTargetBinding(RenderTargetCube renderTargetCube, CubeMapFace face)
{
this.renderTarget = renderTargetCube;
this.cubeMapFace = face;
}
public static implicit operator RenderTargetBinding(RenderTarget2D renderTarget)
{
return new RenderTargetBinding(renderTarget);
}
2011-10-31 05:36:24 +00:00
}
}