Show More
Commit Description:
Fix syntax error.
Commit Description:
Fix syntax error.
File last commit:
Show/Diff file:
Action:
FNA/src/Graphics/States/SamplerState.cs
193 lines | 3.3 KiB | text/x-csharp | CSharpLexer
Early working version (including all dependencies, lol).
r0 #region License
/* FNA - XNA4 Reimplementation for Desktop Platforms
Upgrade FNA to 22.12...
r690 * Copyright 2009-2022 Ethan Lee and the MonoGame Team
Early working version (including all dependencies, lol).
r0 *
* Released under the Microsoft Public License.
* See LICENSE for details.
*/
#endregion
namespace Microsoft.Xna.Framework.Graphics
{
public class SamplerState : GraphicsResource
{
#region Public Properties
public TextureAddressMode AddressU
{
Upgrade FNA to 22.12...
r690 get
{
return state.addressU;
}
set
{
state.addressU = value;
}
Early working version (including all dependencies, lol).
r0 }
public TextureAddressMode AddressV
{
Upgrade FNA to 22.12...
r690 get
{
return state.addressV;
}
set
{
state.addressV = value;
}
Early working version (including all dependencies, lol).
r0 }
public TextureAddressMode AddressW
{
Upgrade FNA to 22.12...
r690 get
{
return state.addressW;
}
set
{
state.addressW = value;
}
Early working version (including all dependencies, lol).
r0 }
public TextureFilter Filter
{
Upgrade FNA to 22.12...
r690 get
{
return state.filter;
}
set
{
state.filter = value;
}
Early working version (including all dependencies, lol).
r0 }
public int MaxAnisotropy
{
Upgrade FNA to 22.12...
r690 get
{
return state.maxAnisotropy;
}
set
{
state.maxAnisotropy = value;
}
Early working version (including all dependencies, lol).
r0 }
public int MaxMipLevel
{
Upgrade FNA to 22.12...
r690 get
{
return state.maxMipLevel;
}
set
{
state.maxMipLevel = value;
}
Early working version (including all dependencies, lol).
r0 }
public float MipMapLevelOfDetailBias
{
Upgrade FNA to 22.12...
r690 get
{
return state.mipMapLevelOfDetailBias;
}
set
{
state.mipMapLevelOfDetailBias = value;
}
Early working version (including all dependencies, lol).
r0 }
#endregion
#region Public SamplerState Presets
public static readonly SamplerState AnisotropicClamp = new SamplerState(
"SamplerState.AnisotropicClamp",
TextureFilter.Anisotropic,
TextureAddressMode.Clamp,
TextureAddressMode.Clamp,
TextureAddressMode.Clamp
);
public static readonly SamplerState AnisotropicWrap = new SamplerState(
"SamplerState.AnisotropicWrap",
TextureFilter.Anisotropic,
TextureAddressMode.Wrap,
TextureAddressMode.Wrap,
TextureAddressMode.Wrap
);
public static readonly SamplerState LinearClamp = new SamplerState(
"SamplerState.LinearClamp",
TextureFilter.Linear,
TextureAddressMode.Clamp,
TextureAddressMode.Clamp,
TextureAddressMode.Clamp
);
public static readonly SamplerState LinearWrap = new SamplerState(
"SamplerState.LinearWrap",
TextureFilter.Linear,
TextureAddressMode.Wrap,
TextureAddressMode.Wrap,
TextureAddressMode.Wrap
);
public static readonly SamplerState PointClamp = new SamplerState(
"SamplerState.PointClamp",
TextureFilter.Point,
TextureAddressMode.Clamp,
TextureAddressMode.Clamp,
TextureAddressMode.Clamp
);
public static readonly SamplerState PointWrap = new SamplerState(
"SamplerState.PointWrap",
TextureFilter.Point,
TextureAddressMode.Wrap,
TextureAddressMode.Wrap,
TextureAddressMode.Wrap
);
#endregion
Upgrade FNA to 22.12...
r690 #region Internal FNA3D Variables
internal FNA3D.FNA3D_SamplerState state;
#endregion
Early working version (including all dependencies, lol).
r0 #region Public Constructor
public SamplerState()
{
Filter = TextureFilter.Linear;
AddressU = TextureAddressMode.Wrap;
AddressV = TextureAddressMode.Wrap;
AddressW = TextureAddressMode.Wrap;
MaxAnisotropy = 4;
MaxMipLevel = 0;
MipMapLevelOfDetailBias = 0.0f;
}
#endregion
#region Private Constructor
private SamplerState(
string name,
TextureFilter filter,
TextureAddressMode addressU,
TextureAddressMode addressV,
TextureAddressMode addressW
) : this() {
Name = name;
Filter = filter;
AddressU = addressU;
AddressV = addressV;
AddressW = addressW;
}
#endregion
}
}