Hi Abdalla,
Carsten Neumann wrote:
>
> hm, a SolidBackground with alpha 0 should work.
> Did you set a pixel format that holds alpha values for the image that is
> used with the GrabForeground ?
> Basically the GrabForeground boils down to this:
>
> glReadPixels(port->getPixelLeft(), port->getPixelBottom(),
> w, h, i->getPixelFormat(),
> i->getDataType(), i->getData());
>
> where port is the Viewport and i is the Image. Since there is nothing
> complicated going on in there I'm a bit at a loss as to what might go
> wrong. Are you able to create a small (tutorial style) program that
> reproduces the problem? That would be a great help to find out what the
> problem is,
two things that are easily forgotten:
- by default OpenGL framebuffers don't have an Alpha channel, you need to tell
the system to ctreate one when you create the window (in GLUT you need to add
GLUT_ALPHA to the glutInitDisplayMode call).
- by default the background alpha is 1. If you want 0 you need to use your own
SolidBackground and set the alpha.
Hope it helps
Dirk
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users