Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Alpha-Blending
Print
Pages: [
1
]
Author
Topic: Alpha-Blending (Read 4837 times)
0 Members and 1 Guest are viewing this topic.
Nikko_Bertoa
Newbie
Posts: 10
Alpha-Blending
«
on:
February 19, 2010, 04:46:44 am »
Hi community.
How can I use alpha-blending in SFML?
In SDL we have the function:
int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);
What is the equivalent function in SFML?
Thanks!
Logged
My Game Programming Portfolio:
https://sites.google.com/site/nicolasbertoa/
Laurent
Administrator
Hero Member
Posts: 32498
Alpha-Blending
«
Reply #1 on:
February 19, 2010, 09:23:57 am »
You must change the alpha component of the global color of your sprite
Code:
[Select]
sprite.SetColor(sf::Color(255, 255, 255, alpha));
Logged
Laurent Gomila - SFML developer
Nikko_Bertoa
Newbie
Posts: 10
Alpha-Blending
«
Reply #2 on:
February 19, 2010, 02:37:26 pm »
Thanks!!
Logged
My Game Programming Portfolio:
https://sites.google.com/site/nicolasbertoa/
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Alpha-Blending