using System;
using SFML.Window;
using SFML.Graphics;
namespace Utilities
{
public class Utilities
{
public static Sprite TextToSprite (Text text)
{
FloatRect textb=text.GetRect();
RenderTexture rtex = new RenderTexture((uint)textb.Width, (uint)textb.Height);
rtex.Draw (text);
return new Sprite(rtex.Texture);
}
}
}
Returns an error:
Failed to share the OpenGL context
Impossible to create render texture (failed to link the target texture to the fr
ame buffer)
The failed to create an Opengl texture is a seperate error, I would assume, which causes the second.