I am trying to get alpha blending to work with layers, on a Coral-P board (Rev 4.0). The code has two layers, both with rectangles, and they overlap somewhat. This is the code I use to attempt to get the layer to have a uniform transparency over its entire surface:
PgLayerAlpha_t alpha;
alpha.salpha = 0x80;
alpha.dalpha = 0x80;
alpha.op = Pg_LAYER_ALPHA_M1_GLOBAL | Pg_LAYER_BLEND_SRC_M1_ALPHA | Pg_LAYER_BLEND_DEST_ONE_MINUS_M1_ALPHA;
PgSetLayerArg(ellLayer, Pg_LAYER_ARG_ALPHA, &alpha, sizeof(alpha));
I am successful in getting mulitple layers to display, and have managed to get Chroma keying to work, but not alpha blending. Any ideas? Also, for some reason the QNX API reports that the Coral-P only supports these display modes:
8 (8 bit)
15 (15 bit)
and that the Coral-P supports these layer formats:
Layer 0:Pg_Layer_Format_ARGB1555
Layer 1:Pg_Layer_Format_ARGB1555
Layer 2:Pg_Layer_Format_ARGB1555, Pg_Layer_Format_PAL8
Layer 3:Pg_Layer_Format_ARGB1555, Pg_Layer_Format_PAL8
Layer 4:Pg_Layer_Format_ARGB1555, Pg_Layer_Format_PAL8, Pg_Layer_Format_UYVY
Layer 5: Pg_Layer_Format_ARGB1555, Pg_Layer_Format_PAL8
Surely the Coral-P must support ARGB8888, otherwise how would you be able to do alpha blending properly? Anybody have any advice or code snippets?
Thanks