From acea318a8ac3c116817cb52f82bc3372973d9065 Mon Sep 17 00:00:00 2001 From: Glatzemann Date: Thu, 16 Aug 2012 12:04:46 +0000 Subject: [PATCH] more content for the ContentPipeline... --- .../ANX.Framework.Content.Pipeline.csproj | 7 ++ .../Graphics/AlphaTestMaterialContent.cs | 65 +++++++++++++++++ .../Graphics/BitmapContent.cs | 71 +++++++++++++++++++ .../Graphics/MaterialContent.cs | 52 ++++++++++++++ .../Graphics/MipmapChain.cs | 32 +++++++++ .../Graphics/MipmapChainCollection.cs | 19 +++++ .../Graphics/TextureContent.cs | 41 +++++++++++ .../Graphics/TextureReferenceDictionary.cs | 22 ++++++ 8 files changed, 309 insertions(+) create mode 100644 ANX.Framework.Content.Pipeline/Graphics/AlphaTestMaterialContent.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/BitmapContent.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/MaterialContent.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/MipmapChain.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/MipmapChainCollection.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/TextureContent.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/TextureReferenceDictionary.cs diff --git a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline.csproj b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline.csproj index e3b162d9..0a231f88 100644 --- a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline.csproj +++ b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline.csproj @@ -34,6 +34,8 @@ + + @@ -54,8 +56,13 @@ + + + + + diff --git a/ANX.Framework.Content.Pipeline/Graphics/AlphaTestMaterialContent.cs b/ANX.Framework.Content.Pipeline/Graphics/AlphaTestMaterialContent.cs new file mode 100644 index 00000000..951cbc2e --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/AlphaTestMaterialContent.cs @@ -0,0 +1,65 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ANX.Framework.Graphics; + +#endregion + +// 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 + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public class AlphaTestMaterialContent : MaterialContent + { + public const string AlphaFunctionKey = ""; + public const string AlphaKey = ""; + public const string DiffuseColorKey = ""; + public const string ReferenceAlphaKey = ""; + public const string TextureKey = ""; + public const string VertexColorEnabledKey = ""; + + public AlphaTestMaterialContent() + { + } + + public Nullable Alpha + { + get; + set; + } + + public Nullable AlphaFunction + { + get; + set; + } + + public Nullable DiffuseColor + { + get; + set; + } + + public Nullable ReferenceAlpha + { + get; + set; + } + + public ExternalReference Texture + { + get; + set; + } + + public Nullable VertexColorEnabled + { + get; + set; + } + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/BitmapContent.cs b/ANX.Framework.Content.Pipeline/Graphics/BitmapContent.cs new file mode 100644 index 00000000..95e5abf4 --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/BitmapContent.cs @@ -0,0 +1,71 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ANX.Framework.Graphics; + +#endregion + +// 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 + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public abstract class BitmapContent : ContentItem + { + public BitmapContent() + { + + } + + protected BitmapContent(int width, int height) + { + Width = width; + Height = height; + } + + public int Height + { + get; + set; + } + + public int Width + { + get; + set; + } + + public static void Copy(BitmapContent sourceBitmap, BitmapContent destinationBitmap) + { + throw new NotImplementedException(); + } + + public static void Copy(BitmapContent sourceBitmap, Rectangle sourceRegion, BitmapContent destinationBitmap, Rectangle destinationRegion) + { + throw new NotImplementedException(); + } + + public abstract byte[] GetPixelData(); + + public abstract void SetPixelData(byte[] sourceData); + + public abstract bool TryGetFormat(out SurfaceFormat format); + + public override string ToString() + { + throw new NotImplementedException(); + } + + protected abstract bool TryCopyFrom(BitmapContent sourceBitmap, Rectangle sourceRegion, Rectangle destinationRegion); + + protected abstract bool TryCopyTo(BitmapContent destinationBitmap, Rectangle sourceRegion, Rectangle destinationRegion); + + protected static void ValidateCopyArguments(BitmapContent sourceBitmap, Rectangle sourceRegion, BitmapContent destinationBitmap, Rectangle destinationRegion) + { + throw new NotImplementedException(); + } + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/MaterialContent.cs b/ANX.Framework.Content.Pipeline/Graphics/MaterialContent.cs new file mode 100644 index 00000000..9348cbcf --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/MaterialContent.cs @@ -0,0 +1,52 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +#endregion + +// 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 + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public class MaterialContent : ContentItem + { + public MaterialContent() + { + } + + public TextureReferenceDictionary Textures + { + get; + private set; + } + + protected T GetReferenceTypeProperty(string key) where T : class + { + throw new NotImplementedException(); + } + + protected ExternalReference GetTexture(String key) + { + throw new NotImplementedException(); + } + + protected Nullable GetValueTypeProperty(string key) where T : struct + { + throw new NotImplementedException(); + } + + protected void SetProperty(string key, T value) + { + throw new NotImplementedException(); + } + + protected void SetTexture(String key, ExternalReference value) + { + throw new NotImplementedException(); + } + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/MipmapChain.cs b/ANX.Framework.Content.Pipeline/Graphics/MipmapChain.cs new file mode 100644 index 00000000..b4ffcf19 --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/MipmapChain.cs @@ -0,0 +1,32 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections.ObjectModel; + +#endregion + +// 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 + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public sealed class MipmapChain : Collection + { + public MipmapChain() + { + } + + public MipmapChain(BitmapContent bitmap) + { + throw new NotImplementedException(); + } + + public static MipmapChain op_Implicit(BitmapContent bitmap) + { + throw new NotImplementedException(); + } + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/MipmapChainCollection.cs b/ANX.Framework.Content.Pipeline/Graphics/MipmapChainCollection.cs new file mode 100644 index 00000000..7421927a --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/MipmapChainCollection.cs @@ -0,0 +1,19 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections.ObjectModel; + +#endregion + +// 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 + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public sealed class MipmapChainCollection : Collection + { + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/TextureContent.cs b/ANX.Framework.Content.Pipeline/Graphics/TextureContent.cs new file mode 100644 index 00000000..02e8ca79 --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/TextureContent.cs @@ -0,0 +1,41 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ANX.Framework.Graphics; + +#endregion + +// 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 + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public abstract class TextureContent : ContentItem + { + protected TextureContent(MipmapChainCollection faces) + { + Faces = faces; + } + + public MipmapChainCollection Faces + { + get; + private set; + } + + public void ConvertBitmapType(Type newBitmapType) + { + throw new NotImplementedException(); + } + + public virtual void GenerateMipmaps(bool overwriteExistingMipmaps) + { + throw new NotImplementedException(); + } + + public abstract void Validate(Nullable targetProfile); + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/TextureReferenceDictionary.cs b/ANX.Framework.Content.Pipeline/Graphics/TextureReferenceDictionary.cs new file mode 100644 index 00000000..bd3478e2 --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/TextureReferenceDictionary.cs @@ -0,0 +1,22 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +#endregion + +// 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 + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public sealed class TextureReferenceDictionary : NamedValueDictionary> + { + public TextureReferenceDictionary() + { + } + + } +}