View Full Version : alpha texture problem
02-03-2012, 02:34 AM
I show 2 triangles with png textures RGBA, it works without alpha activated.
But, when i activate alpha with
My all screen become black. But alpha works without texturing.
Someone can help me please ? Thanks
02-03-2012, 06:42 AM
Most probably you do not fill the A of your texture properly the the bendfunc you use.
0.0 means completely transparent, 1.0 (or 255) means opaque.
Quick fix could be to use this instead :
02-03-2012, 12:55 PM
Thanks, but with
alpha is replaced by a black color. :-(
i tried with
it works for alpha, but all pixels are transformed, like this : a green pixel from texture_1 is transformed into a light blue pixel when it's over the blue pixel from texture_0.
02-05-2012, 02:42 AM
The problem was from SDL_CreateRGBSurface( ... );
to direct copy blits :
SDL_CreateRGBSurface( ... );
This allows all the alpha values from the source surface to be copied to the destination surface during blitting.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.