Hello,

I work on a freescale IMX51 target under WinCE.
I am not able to activate alpha blending when drawing images.
Can you help?

Here is my EGL config:

static const EGLint s_configAttribs[] =
{
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, 8,
EGL_LUMINANCE_SIZE, EGL_DONT_CARE,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT,
EGL_NONE
};

Here is my image creation:

VGuint *buffer = new VGuint [255*255];
width = 255;
height = 255;
long i = 0;
long size = width * height;

VGuint *pter = buffer;
for(unsigned int i=0; i<height; i++)
{
for(unsigned int j=0; j<width; j++)
{
*pter++ = RGBA(255,0,0,i);
}

}

vgImage = vgCreateImage(VG_sRGBA_8888, width, height, VG_IMAGE_QUALITY_BETTER);
vgImageSubData(vgImage, buffer, 4*width, VG_sRGBA_8888, 0, 0, width, height);

VGErrorCode err = vgGetError ();

free ( buffer );


Here is the image rendering:

float clearColor[4] = {0,0,0,0};
vgSetfv(VG_CLEAR_COLOR, 4, clearColor);
vgClear(0, 0, i32WindowWidth, i32WindowHeight);

vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);
vgLoadIdentity();

vgDrawImage (vgImage);
VGErrorCode err = vgGetError ();


I can see a red square without any alpha shading or gradation.
I checked that the image is OK in memory (alpha changes).
I have the same behavior with a png image (image OK but no alpha change).
Do I have to enable blending with a specific command (change VG_IMAGE_MODE? VG_COLOR_TRANSFORM?)

Thank you for your support !