public Renderer () { _x = -1; _y = -1; _width = -1; _height = -1; _background = Color.Gray; _catalog = null; }
public override Texture ImportTexture(Catalog Catalog, string Name, string Path) { Console.WriteLine(string.Format("ImportTexture({0},\"{1}\",\"{2}\")", Catalog, Name, Path)); if(!File.Exists(Path)) { throw new Exception(string.Format("There is no image for \"{0}\" found at the specified path \"{1}\"", Name, Path)); } Texture texture = new Texture(); texture.ID = 1; texture.Name = Name; texture.TextureSource = new TextureDiskSource(Path); TextureLoader<Texture> textureLoader = CreateTextureLoader(texture); Catalog.RegisterTexture(ref texture, ref textureLoader); return texture; }