From: Thorsten R. <tho...@iv...> - 2000-10-12 08:15:17
|
> > does anybody know, what is meant with "destination alpha" in the docu of > > glBlendFunc() ? "source alpha" is taken from glColor(), but the > destination > > one ? > > I think the destination alpha is taken from the frame buffer (front or > back buffer) if you are using an RGBA frame buffer (32 bpp). How do I use a RGBA frame buffer ? is it the <GLCanvas.rgba> flag ? <GLCanvas.getGLContext().isRGBA()> says <true>. How do I write alpha values in the buffer ? I thought the following would do the trick: glEnable (GL_BLEND); glBlendFunc (GL_ONE, GL_ZERO); // is default for blending glColor4f (r,g,b, 0.5f); drawPolygon(); but when drawing another Polygon over the first one with glBlendFunc (GL_DST_ALPHA, GL_DST_ONE_MINUS_ALPHA); glColor3f (r2,g2,b2); // alpha = 1f drawPolygon(); I get a second Polygon with full (r2,g2,b2). So it looks like the alpha values in the framebuffer are 1's rather than 0.5 ?! Any ideas ? Thorsten |