SFML community forums

Help => General => Topic started by: prchakal on May 21, 2013, 11:47:23 pm

Title: Shape with alpha effect
Post by: prchakal on May 21, 2013, 11:47:23 pm
Hi,

Im drying use shapes to debug box2d physics. But the problem is that shape dont have a method to make it alpha.

I see some examples that you can use opengl direct to do it.

SFML has a native method to make shapes with alpha?
Title: Re: Shape with alpha effect
Post by: Nexus on May 21, 2013, 11:50:48 pm
But the problem is that shape dont have a method to make it alpha.
They do, setColor().
Title: Re: Shape with alpha effect
Post by: prchakal on May 21, 2013, 11:54:36 pm
Hi Nexus.

It works.

The code for reference:
Quote
rectangle.setFillColor(sf::Color(255,0,0,100));  // reg, green, blue, alpha

Very thanks man.