Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dayday

Pages: [1]
1
Graphics / Draw a sprite on root window
« on: August 02, 2011, 08:51:12 pm »
Thanks for answer.

I'm using Ubuntu and I found that Gnome explorer, Nautilus, creates its own windows above the X root window.

It seems that some guys have created some C functions to retrieves Gnome or KDE dektop Window, to draw on it. See this http://stackoverflow.com/questions/2288456/using-desktop-as-canvas-on-linux for more information.

I'm currently trying to use these functions to draw on Gnome. I'll put the solution here if I find something working.

By the way Laurent, SFML is a very nice library, useful, and well designed. I always try to adopt a design as clean as yours in SFML. o)

2
Graphics / Draw a sprite on root window
« on: August 01, 2011, 07:24:57 pm »
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:

Code: [Select]

// 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)));

3
General discussions / FindSFML for CMAKE
« on: July 12, 2011, 09:22:40 pm »
Thank you man, you FindSFML module is fantastic, it helps a lot!

Pages: [1]
anything