예제 #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;
        }
예제 #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;
            }
        }