Hello guys,
I am currently trying to draw sprites on the OS root window (either Windows or Linux) and I'm wondering if this is possible using SFML?
On linux, according to the tutorial on X11 integration (
http://www.sfml-dev.org/tutorials/1.6/graphics-x11.php), it seems that sf::RenderWindow can be created with a Window object. And then we can call the Draw method.
So I tried with the X11 root window but it doesn't seems to work. Is it normal, or am I doing something wrong?
The goal is actually to replace mouse icon with some non-standard icons.
Here is the code I tried:
// Get root window
Display* Disp = XOpenDisplay(NULL);
int Screen = DefaultScreen(Disp);
Window RootWindow = XRootWindow(Disp, Screen);
// Create sfml render object with the root window
sf::RenderWindow SFMLView(RootWindow);
// Draw a sprite
SFMLView.Draw(sf::Shape::Circle(50, 50, 50, sf::Color(255, 0, 0)));