LoadLocalImage() public méthode

public LoadLocalImage ( string pathToFile ) : GLTexture
pathToFile string
Résultat Sparrow.Textures.GLTexture
        public Benchmark()
        {
            TextureLoader starRes = new TextureLoader();
            starRes.LoadLocalImage("benchmark_object.png");
            textures = new Texture[] { starRes.Texture };

            // the container will hold all test objects
            _container = new Sprite();
            AddChild(_container);

            EnterFrame += EnterFrameHandler;
            AddedToStage += AddedToStageHandler;
        }
        private Texture TextureReferencedByXmlData(TextureLoader textureLoader, Stream fontXmlData)
        {
            XmlDocument xml = new XmlDocument();
            xml.Load(fontXmlData);

            Texture texture = null;
            XmlNodeList pageNodes = xml.GetElementsByTagName("page");
            for (int i = 0; i < pageNodes.Count; i++)
            {
                XmlAttributeCollection attributes = pageNodes[i].Attributes;
                int id = Convert.ToInt32(attributes["id"]);
                if (id != 0)
                {
                    throw new Exception("Bitmap fonts with multiple pages are not supported");
                }

                string filename = attributes["file"].Value;
                string absolutePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Resources), filename); // NSBundle.MainBundle.BundlePath
                texture = textureLoader.LoadLocalImage(absolutePath);
            }

            if (texture == null)
            {
                throw new InvalidDataException("Font XML doesn't contain path to texture");
            }

            return texture;
        }