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:
parent
94e34228aa
commit
4adbea1887
@ -21,7 +21,7 @@ namespace ANX.Framework.Content.Pipeline.Graphics
|
||||
|
||||
public MipmapChain(BitmapContent bitmap)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
base.Add(bitmap);
|
||||
}
|
||||
|
||||
public static MipmapChain op_Implicit(BitmapContent bitmap)
|
||||
|
@ -15,5 +15,12 @@ namespace ANX.Framework.Content.Pipeline.Graphics
|
||||
{
|
||||
public sealed class MipmapChainCollection : Collection<MipmapChain>
|
||||
{
|
||||
public MipmapChainCollection(int levels)
|
||||
{
|
||||
for (int i = 0; i < levels; i++)
|
||||
{
|
||||
base.Add(new MipmapChain());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,8 @@ namespace ANX.Framework.Content.Pipeline.Graphics
|
||||
{
|
||||
public class PixelBitmapContent<T> : BitmapContent where T : struct, IEquatable<T>
|
||||
{
|
||||
private T[,] pixels;
|
||||
|
||||
protected PixelBitmapContent()
|
||||
{
|
||||
|
||||
@ -22,12 +24,12 @@ namespace ANX.Framework.Content.Pipeline.Graphics
|
||||
public PixelBitmapContent(int width, int height)
|
||||
: base(width, height)
|
||||
{
|
||||
|
||||
pixels = new T[width, height];
|
||||
}
|
||||
|
||||
public T GetPixel(int x, int y)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return pixels[x, y];
|
||||
}
|
||||
|
||||
public override byte[] GetPixelData()
|
||||
@ -42,7 +44,7 @@ namespace ANX.Framework.Content.Pipeline.Graphics
|
||||
|
||||
public void SetPixel(int x, int y, T value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
pixels[x, y] = value;
|
||||
}
|
||||
|
||||
public override void SetPixelData(byte[] sourceData)
|
||||
|
@ -15,7 +15,7 @@ namespace ANX.Framework.Content.Pipeline.Graphics
|
||||
public class Texture2DContent : TextureContent
|
||||
{
|
||||
public Texture2DContent()
|
||||
: base(null) //TODO: implement
|
||||
: base(new MipmapChainCollection(1))
|
||||
{
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user