drawing 2D image

So, i have a question.

I want be able to draw an image with alpha on the screen.
I want the color fusion to be done with the current color on the buffer.

For this i fo it:

    // enable SRC_OVER
    glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);

    // bind a translucent color for our quad
    glColor4f(0f,0f,0f,0f);

    // draw our quad with the alpha image
    glEnable(GL.GL_TEXTURE_2D );
    glBindTexture(GL.GL_TEXTURE_2D, ctx.getTexture().getTextureId() );
    glBegin(GL.GL_QUADS);
		
    glTexCoord2f( textureBounds[0].getX() , textureBounds[0].getY() );
    glVertex2f ( x , y );
		
    glTexCoord2f( textureBounds[1].getX() , textureBounds[1].getY() );
    glVertex2f( x + img.getWidth() , y );
		
    glTexCoord2f( textureBounds[2].getX() , textureBounds[2].getY() );
    glVertex2f( x + img.getWidth() , y + img.getHeight() );
		
    glTexCoord2f( textureBounds[3].getX() , textureBounds[3].getY() );
    glVertex2f(x, y + img.getHeight() );
		
   glEnd();
   glBindTexture( GL.GL_TEXTURE_2D , 0 );

   // restore previous color

With this sequence, it draw nothing. It le me thinks that the translucent color disable the quad to be visible ?

PS: with an opaque image, it’s the same… i don’t undestand what it do…

Do you enable blending?

yes using glEnable( GL.GL_BLEND );

If i change my translucent color by WHITE glColor4f(1f,1f,1f,1f); it works.
But i don’t understant why… ? have you an idea ? it has somethings that trick me.

If the vertex colors are transparent black (r=0f, g=0f, b=0f, a=0f), then your image will not show. Setting the alpha component to zero would be the equivalent of rendering an image with 0% opacity (i.e. invisible). Setting it to 1.0 would be the equivalent of 100% opacity (i.e. fully visible).

Also, the red, green and blue components should be white (1.0f) unless you want to tint your image a different colour.

By this logic, if you wanted to render your image with 50% opacity:

glColor4f(1f, 1f, 1f, 0.5f);
//now place vertices...