- implemented all effect readers
This commit is contained in:
parent
f5367ebfbc
commit
7774dd69a6
@ -75,9 +75,15 @@
|
||||
<Compile Include="Content\ContentSerializerRuntimeTypeAttribute.cs" />
|
||||
<Compile Include="Content\ContentSerializerTypeVersionAttribute.cs" />
|
||||
<Compile Include="Content\Decompressor.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\AlphaTestEffectReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\BasicEffectReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\DualTextureEffectReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\EffectMaterialReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\EffectReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\EnvironmentMapEffectReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\IndexBufferReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\ModelReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\SkinnedEffectReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\SpriteFontReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\Texture2DReader.cs" />
|
||||
<Compile Include="Content\GraphicTypeReaders\Texture3DReader.cs" />
|
||||
@ -132,7 +138,7 @@
|
||||
<Compile Include="CurveTangent.cs" />
|
||||
<Compile Include="Design\ANXFieldDescriptor.cs" />
|
||||
<Compile Include="Design\ANXPropertyDescriptor.cs" />
|
||||
<Compile Include="Design\BoundingBox.cs" />
|
||||
<Compile Include="Design\BoundingBoxConverter.cs" />
|
||||
<Compile Include="Design\BoundingSphereConverter.cs" />
|
||||
<Compile Include="Design\ColorConverter.cs" />
|
||||
<Compile Include="Design\MathTypeConverter.cs" />
|
||||
@ -177,11 +183,14 @@
|
||||
<Compile Include="GameTimer.cs" />
|
||||
<Compile Include="GameWindow.cs" />
|
||||
<Compile Include="GraphicsDeviceInformation.cs" />
|
||||
<Compile Include="Graphics\BasicEffect.cs" />
|
||||
<Compile Include="Graphics\DeviceLostException.cs" />
|
||||
<Compile Include="Graphics\DisplayMode.cs" />
|
||||
<Compile Include="Graphics\DisplayModeCollection.cs" />
|
||||
<Compile Include="Graphics\DualTextureEffect.cs" />
|
||||
<Compile Include="Graphics\DynamicVertexBuffer.cs" />
|
||||
<Compile Include="Graphics\EffectMaterial.cs" />
|
||||
<Compile Include="Graphics\EnvironmentMapEffect.cs" />
|
||||
<Compile Include="Graphics\GraphicsAdapter.cs" />
|
||||
<Compile Include="Graphics\GraphicsDevice.cs" />
|
||||
<Compile Include="GraphicsDeviceManager.cs" />
|
||||
@ -256,6 +265,7 @@
|
||||
<Compile Include="Graphics\RenderTargetBinding.cs" />
|
||||
<Compile Include="Graphics\ResourceCreatedEventArgs.cs" />
|
||||
<Compile Include="Graphics\ResourceDestroyedEventArgs.cs" />
|
||||
<Compile Include="Graphics\SkinnedEffect.cs" />
|
||||
<Compile Include="Graphics\TextureCollection.cs" />
|
||||
<Compile Include="Graphics\VertexPositionNormalTexture.cs" />
|
||||
<Compile Include="Graphics\VertexPositionTexture.cs" />
|
||||
|
@ -0,0 +1,76 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ANX.Framework.NonXNA;
|
||||
using ANX.Framework.Graphics;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Content.GraphicTypeReaders
|
||||
{
|
||||
public class AlphaTestEffectReader : ContentTypeReader<AlphaTestEffect>
|
||||
{
|
||||
protected internal override AlphaTestEffect Read(ContentReader input, AlphaTestEffect existingInstance)
|
||||
{
|
||||
var graphics = input.ResolveGraphicsDevice();
|
||||
var effect = new AlphaTestEffect(graphics);
|
||||
|
||||
effect.Texture = input.ReadExternalReference<Texture2D>();
|
||||
effect.AlphaFunction = (CompareFunction)input.ReadInt32();
|
||||
effect.ReferenceAlpha = input.ReadInt32();
|
||||
effect.DiffuseColor = input.ReadVector3();
|
||||
effect.Alpha = input.ReadSingle();
|
||||
effect.VertexColorEnabled = input.ReadBoolean();
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ANX.Framework.NonXNA;
|
||||
using ANX.Framework.Graphics;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Content.GraphicTypeReaders
|
||||
{
|
||||
public class BasicEffectReader : ContentTypeReader<BasicEffect>
|
||||
{
|
||||
protected internal override BasicEffect Read(ContentReader input, BasicEffect existingInstance)
|
||||
{
|
||||
var graphics = input.ResolveGraphicsDevice();
|
||||
var effect = new BasicEffect(graphics);
|
||||
Texture2D texture = input.ReadExternalReference<Texture2D>();
|
||||
if (texture != null)
|
||||
{
|
||||
effect.Texture = texture;
|
||||
effect.TextureEnabled = true;
|
||||
}
|
||||
effect.DiffuseColor = input.ReadVector3();
|
||||
effect.EmissiveColor = input.ReadVector3();
|
||||
effect.SpecularColor = input.ReadVector3();
|
||||
effect.SpecularPower = input.ReadSingle();
|
||||
effect.Alpha = input.ReadSingle();
|
||||
effect.VertexColorEnabled = input.ReadBoolean();
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ANX.Framework.NonXNA;
|
||||
using ANX.Framework.Graphics;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Content.GraphicTypeReaders
|
||||
{
|
||||
public class DualTextureEffectReader : ContentTypeReader<DualTextureEffect>
|
||||
{
|
||||
protected internal override DualTextureEffect Read(ContentReader input, DualTextureEffect existingInstance)
|
||||
{
|
||||
var graphics = input.ResolveGraphicsDevice();
|
||||
var effect = new DualTextureEffect(graphics);
|
||||
|
||||
effect.Texture =input.ReadExternalReference<Texture2D>();
|
||||
effect.Texture2 = input.ReadExternalReference<Texture2D>();
|
||||
effect.DiffuseColor = input.ReadVector3();
|
||||
effect.Alpha = input.ReadSingle();
|
||||
effect.VertexColorEnabled = input.ReadBoolean();
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
}
|
225
ANX.Framework/Content/GraphicTypeReaders/EffectMaterialReader.cs
Normal file
225
ANX.Framework/Content/GraphicTypeReaders/EffectMaterialReader.cs
Normal file
@ -0,0 +1,225 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ANX.Framework.NonXNA;
|
||||
using ANX.Framework.Graphics;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Content.GraphicTypeReaders
|
||||
{
|
||||
public class EffectMaterialReader : ContentTypeReader<EffectMaterial>
|
||||
{
|
||||
protected internal override EffectMaterial Read(ContentReader input, EffectMaterial existingInstance)
|
||||
{
|
||||
Effect clonedEffect = input.ReadExternalReference<Effect>();
|
||||
EffectMaterial effectMaterial = new EffectMaterial(clonedEffect);
|
||||
Dictionary<string, object> dictionary = input.ReadObject<Dictionary<string, object>>();
|
||||
foreach (KeyValuePair<string, object> pair in dictionary)
|
||||
{
|
||||
SetMaterialParameter(effectMaterial, pair.Key, pair.Value);
|
||||
}
|
||||
return effectMaterial;
|
||||
}
|
||||
|
||||
private void SetMaterialParameter(EffectMaterial material, string key, object value)
|
||||
{
|
||||
EffectParameter parameter = material.Parameters[key];
|
||||
if (parameter != null)
|
||||
{
|
||||
Type type = value.GetType();
|
||||
try
|
||||
{
|
||||
if (type == typeof(int[]))
|
||||
{
|
||||
parameter.SetValue((int[])value);
|
||||
}
|
||||
else if (type == typeof(bool[]))
|
||||
{
|
||||
parameter.SetValue((bool[])value);
|
||||
}
|
||||
else if (type == typeof(float[]))
|
||||
{
|
||||
parameter.SetValue((float[])value);
|
||||
}
|
||||
else if (type == typeof(Vector2[]))
|
||||
{
|
||||
parameter.SetValue((Vector2[])value);
|
||||
}
|
||||
else if (type == typeof(Vector3[]))
|
||||
{
|
||||
parameter.SetValue((Vector3[])value);
|
||||
}
|
||||
else if (type == typeof(Vector4[]))
|
||||
{
|
||||
parameter.SetValue((Vector4[])value);
|
||||
}
|
||||
else if (type == typeof(Matrix[]))
|
||||
{
|
||||
parameter.SetValue((Matrix[])value);
|
||||
}
|
||||
else if (type == typeof(int))
|
||||
{
|
||||
parameter.SetValue((int)value);
|
||||
}
|
||||
else if (type == typeof(bool))
|
||||
{
|
||||
parameter.SetValue((bool)value);
|
||||
}
|
||||
else if (type == typeof(float))
|
||||
{
|
||||
parameter.SetValue((float)value);
|
||||
}
|
||||
else if (type == typeof(Vector2))
|
||||
{
|
||||
parameter.SetValue((Vector2)value);
|
||||
}
|
||||
else if (type == typeof(Vector3))
|
||||
{
|
||||
parameter.SetValue((Vector3)value);
|
||||
}
|
||||
else if (type == typeof(Vector4))
|
||||
{
|
||||
parameter.SetValue((Vector4)value);
|
||||
}
|
||||
else if (type == typeof(Matrix))
|
||||
{
|
||||
parameter.SetValue((Matrix)value);
|
||||
}
|
||||
else if (type == typeof(string))
|
||||
{
|
||||
parameter.SetValue((string)value);
|
||||
}
|
||||
else
|
||||
{
|
||||
Texture texture = value as Texture;
|
||||
if (texture != null)
|
||||
{
|
||||
parameter.SetValue(texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
if (parameter.ColumnCount == 1)
|
||||
{
|
||||
if (type == typeof(Vector2))
|
||||
{
|
||||
parameter.SetValue(((Vector2)value).X);
|
||||
}
|
||||
else if (type == typeof(Vector3))
|
||||
{
|
||||
parameter.SetValue(((Vector3)value).X);
|
||||
}
|
||||
else if (type == typeof(Vector4))
|
||||
{
|
||||
parameter.SetValue(((Vector4)value).X);
|
||||
}
|
||||
}
|
||||
if (parameter.ColumnCount == 2)
|
||||
{
|
||||
if (type == typeof(Vector2))
|
||||
{
|
||||
parameter.SetValue(((Vector2)value));
|
||||
}
|
||||
else if (type == typeof(Vector3))
|
||||
{
|
||||
Vector3 v = (Vector3)value;
|
||||
parameter.SetValue(new Vector2(v.X, v.Y));
|
||||
}
|
||||
else if (type == typeof(Vector4))
|
||||
{
|
||||
Vector4 v = (Vector4)value;
|
||||
parameter.SetValue(new Vector2(v.X, v.Y));
|
||||
}
|
||||
}
|
||||
if (parameter.ColumnCount == 3)
|
||||
{
|
||||
if (type == typeof(Vector2))
|
||||
{
|
||||
Vector2 v = (Vector2)value;
|
||||
parameter.SetValue(new Vector3(v.X, v.Y, 0));
|
||||
}
|
||||
else if (type == typeof(Vector3))
|
||||
{
|
||||
Vector3 v = (Vector3)value;
|
||||
parameter.SetValue(v);
|
||||
}
|
||||
else if (type == typeof(Vector4))
|
||||
{
|
||||
Vector4 v = (Vector4)value;
|
||||
parameter.SetValue(new Vector3(v.X, v.Y, v.Z));
|
||||
}
|
||||
}
|
||||
if (parameter.ColumnCount == 4)
|
||||
{
|
||||
if (type == typeof(Vector2))
|
||||
{
|
||||
Vector2 v = (Vector2)value;
|
||||
parameter.SetValue(new Vector4(v.X, v.Y, 0, 1));
|
||||
}
|
||||
else if (type == typeof(Vector3))
|
||||
{
|
||||
Vector3 v = (Vector3)value;
|
||||
parameter.SetValue(new Vector4(v, 1));
|
||||
}
|
||||
else if (type == typeof(Vector4))
|
||||
{
|
||||
Vector4 v = (Vector4)value;
|
||||
parameter.SetValue(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ANX.Framework.NonXNA;
|
||||
using ANX.Framework.Graphics;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Content.GraphicTypeReaders
|
||||
{
|
||||
public class EnvironmentMapEffectReader : ContentTypeReader<EnvironmentMapEffect>
|
||||
{
|
||||
protected internal override EnvironmentMapEffect Read(ContentReader input, EnvironmentMapEffect existingInstance)
|
||||
{
|
||||
var graphics = input.ResolveGraphicsDevice();
|
||||
var effect = new EnvironmentMapEffect(graphics);
|
||||
effect.Texture = input.ReadExternalReference<Texture2D>();
|
||||
effect.EnvironmentMap = input.ReadExternalReference<TextureCube>();
|
||||
effect.EnvironmentMapAmount = input.ReadSingle();
|
||||
effect.EnvironmentMapSpecular = input.ReadVector3();
|
||||
effect.FresnelFactor = input.ReadSingle();
|
||||
effect.DiffuseColor = input.ReadVector3();
|
||||
effect.EmissiveColor = input.ReadVector3();
|
||||
effect.Alpha = input.ReadSingle();
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ANX.Framework.NonXNA;
|
||||
using ANX.Framework.Graphics;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Content.GraphicTypeReaders
|
||||
{
|
||||
public class SkinnedEffectReader : ContentTypeReader<SkinnedEffect>
|
||||
{
|
||||
protected internal override SkinnedEffect Read(ContentReader input, SkinnedEffect existingInstance)
|
||||
{
|
||||
var graphics = input.ResolveGraphicsDevice();
|
||||
var effect = new SkinnedEffect(graphics);
|
||||
|
||||
effect.Texture = input.ReadExternalReference<Texture2D>();
|
||||
effect.WeightsPerVertex = input.ReadInt32();
|
||||
effect.DiffuseColor = input.ReadVector3();
|
||||
effect.EmissiveColor = input.ReadVector3();
|
||||
effect.SpecularColor = input.ReadVector3();
|
||||
effect.SpecularPower = input.ReadSingle();
|
||||
effect.Alpha = input.ReadSingle();
|
||||
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
}
|
316
ANX.Framework/Graphics/BasicEffect.cs
Normal file
316
ANX.Framework/Graphics/BasicEffect.cs
Normal file
@ -0,0 +1,316 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ANX.Framework.NonXNA;
|
||||
using ANX.Framework.Graphics;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
|
||||
namespace ANX.Framework.Graphics
|
||||
{
|
||||
public class BasicEffect : Effect, IEffectMatrices, IEffectLights, IEffectFog
|
||||
{
|
||||
public BasicEffect(GraphicsDevice graphics)
|
||||
: base(graphics, null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected BasicEffect(BasicEffect cloneSource)
|
||||
: base(cloneSource)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool PreferPerPixelLighting
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix Projection
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix View
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix World
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableDefaultLighting()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Vector3 AmbientLightColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public DirectionalLight DirectionalLight0
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public DirectionalLight DirectionalLight1
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public DirectionalLight DirectionalLight2
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool LightingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 FogColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool FogEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float FogEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float FogStart
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Texture2D Texture
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool TextureEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 DiffuseColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 EmissiveColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 SpecularColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float SpecularPower
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float Alpha
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool VertexColorEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public override Effect Clone()
|
||||
{
|
||||
return new BasicEffect(this);
|
||||
}
|
||||
}
|
||||
}
|
221
ANX.Framework/Graphics/DualTextureEffect.cs
Normal file
221
ANX.Framework/Graphics/DualTextureEffect.cs
Normal file
@ -0,0 +1,221 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Graphics
|
||||
{
|
||||
public class DualTextureEffect : Effect, IEffectMatrices, IEffectFog
|
||||
{
|
||||
public DualTextureEffect(GraphicsDevice graphics)
|
||||
: base(graphics, null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected DualTextureEffect(DualTextureEffect cloneSource)
|
||||
: base(cloneSource)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override Effect Clone()
|
||||
{
|
||||
return new DualTextureEffect(this);
|
||||
}
|
||||
|
||||
public Matrix Projection
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix View
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix World
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 FogColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool FogEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float FogEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float FogStart
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Texture2D Texture
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Texture2D Texture2
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 DiffuseColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float Alpha
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool VertexColorEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
301
ANX.Framework/Graphics/EnvironmentMapEffect.cs
Normal file
301
ANX.Framework/Graphics/EnvironmentMapEffect.cs
Normal file
@ -0,0 +1,301 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Graphics
|
||||
{
|
||||
public class EnvironmentMapEffect : Effect, IEffectMatrices, IEffectLights, IEffectFog
|
||||
{
|
||||
public EnvironmentMapEffect(GraphicsDevice graphics)
|
||||
: base(graphics, null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected EnvironmentMapEffect(EnvironmentMapEffect cloneSource)
|
||||
: base(cloneSource)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override Effect Clone()
|
||||
{
|
||||
return new EnvironmentMapEffect(this);
|
||||
}
|
||||
|
||||
public Matrix Projection
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix View
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix World
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableDefaultLighting()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Vector3 AmbientLightColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public DirectionalLight DirectionalLight0
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public DirectionalLight DirectionalLight1
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public DirectionalLight DirectionalLight2
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool LightingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 FogColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool FogEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float FogEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float FogStart
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Texture2D Texture
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public TextureCube EnvironmentMap
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float EnvironmentMapAmount
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 EnvironmentMapSpecular
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float FresnelFactor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 DiffuseColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 EmissiveColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float Alpha
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
317
ANX.Framework/Graphics/SkinnedEffect.cs
Normal file
317
ANX.Framework/Graphics/SkinnedEffect.cs
Normal file
@ -0,0 +1,317 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ANX.Framework.NonXNA;
|
||||
using ANX.Framework.Graphics;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
|
||||
|
||||
namespace ANX.Framework.Graphics
|
||||
{
|
||||
public class SkinnedEffect : Effect, IEffectMatrices, IEffectLights, IEffectFog
|
||||
{
|
||||
public SkinnedEffect(GraphicsDevice graphics)
|
||||
: base(graphics, null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected SkinnedEffect(SkinnedEffect cloneSource)
|
||||
: base(cloneSource)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override Effect Clone()
|
||||
{
|
||||
return new SkinnedEffect(this);
|
||||
}
|
||||
|
||||
public const int MaxBones = 72;
|
||||
|
||||
public bool PreferPerPixelLighting
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix Projection
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix View
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix World
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableDefaultLighting()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Vector3 AmbientLightColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public DirectionalLight DirectionalLight0
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public DirectionalLight DirectionalLight1
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public DirectionalLight DirectionalLight2
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool LightingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 FogColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool FogEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float FogEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float FogStart
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Texture2D Texture
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public int WeightsPerVertex
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 DiffuseColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 EmissiveColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 SpecularColor
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float SpecularPower
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float Alpha
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix[] GetBoneTransforms(int count)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SetBoneTransforms(Matrix[] boneTransforms)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user