Example #1
0
        public ITexture LoadTextureDirect(string fullFilePath)
        {
            SFML.Graphics.Texture sfTexture = new SFML.Graphics.Texture(fullFilePath);
            sfTexture.Smooth = true;

            Texture texture = new Texture(sfTexture);

            return texture;
        }
Example #2
0
        public ITexture LoadTexture(byte[] data)
        {
            using (MemoryStream stream = new MemoryStream()) {
                stream.Write(data, 0, data.Length);

                SFML.Graphics.Texture sfTexture = new SFML.Graphics.Texture(stream);
                sfTexture.Smooth = true;

                Texture texture = new Texture(sfTexture);

                return texture;
            }
        }