2011-11-04 20:22:32 +00:00
|
|
|
using System;
|
2012-09-04 21:36:46 +00:00
|
|
|
using ANX.Framework.NonXNA;
|
2011-11-04 20:22:32 +00:00
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
// 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
|
2011-11-04 20:22:32 +00:00
|
|
|
|
|
|
|
namespace ANX.Framework.Graphics
|
|
|
|
{
|
2012-09-04 21:36:46 +00:00
|
|
|
public sealed class TextureCollection
|
|
|
|
{
|
|
|
|
private Texture[] textures;
|
|
|
|
|
|
|
|
public Texture this[int index]
|
|
|
|
{
|
|
|
|
get
|
2011-11-05 11:35:05 +00:00
|
|
|
{
|
2012-09-04 21:36:46 +00:00
|
|
|
return textures[index];
|
2011-11-05 11:35:05 +00:00
|
|
|
}
|
2012-09-04 21:36:46 +00:00
|
|
|
set
|
|
|
|
{
|
|
|
|
textures[index] = value;
|
|
|
|
var creator = AddInSystemFactory.Instance.GetDefaultCreator<IRenderSystemCreator>();
|
|
|
|
creator.SetTextureSampler(index, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
internal TextureCollection(int maxNumberOfTextures)
|
|
|
|
{
|
|
|
|
textures = new Texture[maxNumberOfTextures];
|
|
|
|
}
|
|
|
|
}
|
2011-11-04 20:22:32 +00:00
|
|
|
}
|