Example #1
0
        private Texture GetTextureFromFile(string FileName)
        {
            Texture texture = null;

            if (File.Exists(FileName))
            {
                Tex.ReadFile(FileName);
                SlimDX.Direct3D9.Format imageFormat = ConvFormat(Tex.GetFormat());
                texture = BuildTexture(Tex.lcTex.imageData[0], imageFormat, (int)Tex.lcTex.Header.Width, (int)Tex.lcTex.Header.Height);
            }
            return(texture);
        }
Example #2
0
        private Texture GetTextureFromFile(string FileName)
        {
            Texture result = null;

            if (File.Exists(FileName))
            {
                Tex.ReadFile(FileName);
                Format imageFormat = this.ConvFormat(Tex.GetFormat());
                result = this.BuildTexture(Tex.lcTex.imageData[0], imageFormat, (int)Tex.lcTex.Header.Width, (int)Tex.lcTex.Header.Height);
            }
            return(result);
        }