SFML community forums

Help => General => Topic started by: Ninjasturm on November 05, 2010, 08:43:04 pm

Title: Transparency Background
Post by: Ninjasturm on November 05, 2010, 08:43:04 pm
Hello Community,

how can i clear the background transparency.
Title: Transparency Background
Post by: Groogy on November 05, 2010, 09:02:09 pm
Which transparency? The one of an image or the window? If it's the window then it's easy with a:

Code: [Select]

window.Clear();
Title: Transparency Background
Post by: Ninjasturm on November 05, 2010, 09:30:24 pm
when i call clear it only clears my screen to a black color.
i tried sf::renderwindow::clear(sf::color(0,0,0,0)) but it doesn't works
Title: Transparency Background
Post by: Laurent on November 05, 2010, 09:33:53 pm
Quote
when i call clear it only clears my screen to a black color.

And what do you want exactly?

Quote
i tried sf::renderwindow::clear(sf::color(0,0,0,255)) but it doesn't works

sf::Color(0, 0, 0, 255) is black.
Title: Transparency Background
Post by: Ninjasturm on November 05, 2010, 09:42:51 pm
I want to see my desktop, is this possible?
Title: Transparency Background
Post by: Laurent on November 05, 2010, 09:47:34 pm
Of course not. SFML can handle transparency inside the target window, but not make the window itself transparent. This must be done with special OS functions.
Title: Transparency Background
Post by: Ninjasturm on November 05, 2010, 09:52:42 pm
Ok, thanks.