Basic texture importer of our own ContentPipeline implementation is now working. Current issue: Wrong default processor is selected (FontProcessor instead of TextureProcessor)...

This commit is contained in:
Glatzemann 2012-09-28 10:06:37 +00:00 committed by Konstantin Koch
parent 94e34228aa
commit 4adbea1887
4 changed files with 14 additions and 5 deletions

View File

@ -21,7 +21,7 @@ namespace ANX.Framework.Content.Pipeline.Graphics
public MipmapChain(BitmapContent bitmap) public MipmapChain(BitmapContent bitmap)
{ {
throw new NotImplementedException(); base.Add(bitmap);
} }
public static MipmapChain op_Implicit(BitmapContent bitmap) public static MipmapChain op_Implicit(BitmapContent bitmap)

View File

@ -15,5 +15,12 @@ namespace ANX.Framework.Content.Pipeline.Graphics
{ {
public sealed class MipmapChainCollection : Collection<MipmapChain> public sealed class MipmapChainCollection : Collection<MipmapChain>
{ {
public MipmapChainCollection(int levels)
{
for (int i = 0; i < levels; i++)
{
base.Add(new MipmapChain());
}
}
} }
} }

View File

@ -14,6 +14,8 @@ namespace ANX.Framework.Content.Pipeline.Graphics
{ {
public class PixelBitmapContent<T> : BitmapContent where T : struct, IEquatable<T> public class PixelBitmapContent<T> : BitmapContent where T : struct, IEquatable<T>
{ {
private T[,] pixels;
protected PixelBitmapContent() protected PixelBitmapContent()
{ {
@ -22,12 +24,12 @@ namespace ANX.Framework.Content.Pipeline.Graphics
public PixelBitmapContent(int width, int height) public PixelBitmapContent(int width, int height)
: base(width, height) : base(width, height)
{ {
pixels = new T[width, height];
} }
public T GetPixel(int x, int y) public T GetPixel(int x, int y)
{ {
throw new NotImplementedException(); return pixels[x, y];
} }
public override byte[] GetPixelData() public override byte[] GetPixelData()
@ -42,7 +44,7 @@ namespace ANX.Framework.Content.Pipeline.Graphics
public void SetPixel(int x, int y, T value) public void SetPixel(int x, int y, T value)
{ {
throw new NotImplementedException(); pixels[x, y] = value;
} }
public override void SetPixelData(byte[] sourceData) public override void SetPixelData(byte[] sourceData)

View File

@ -15,7 +15,7 @@ namespace ANX.Framework.Content.Pipeline.Graphics
public class Texture2DContent : TextureContent public class Texture2DContent : TextureContent
{ {
public Texture2DContent() public Texture2DContent()
: base(null) //TODO: implement : base(new MipmapChainCollection(1))
{ {
} }