Call aglSetInteger with AGL_SURFACE_OPACITY and a value of 0 to make
the AGL surface transparent. Then clear the window backbuffer using
CG to make the window transparent.
HTH,
Adam
On 23/05/2007, at 11:36 AM, Brian Greenstone wrote:
I'm desperately trying to figure out how to render a scene in
OpenGL where back-buffer's alpha values are kept intact so that I
can use it with a compositing window for a borderless effect.
There is sample code called "BoingX" which does exactly this, but I
cannot figure out if there is any equivalent way to do this in
Carbon. I have created a compositing window which works correctly
with the alpha values of anything that I draw into it using Core
Graphics calls. But if I assign an OpenGL draw context to the
window and render into it, the entire window goes opaque because it
is ignoring the OpenGL's backbuffer's alpha. I am setting
glClearColor() to have a small alpha, but no difference, and in
aglCreateContext() I do specify an alpha: "AGL_ALPHA_SIZE, 8"
I think part of the problem is that I'm assigning the window as the
AGL drawable, and for the compositing to work I would have to
assign it to the HIViewRef, but that doesn't seem to be possible
from Carbon. So, does anyone know how to do this in Carbon?
Thanks,
-Brian
__________________________________________________________
Brian Greenstone
President & CEO email@hidden
Pangea Software, Inc. http://www.pangeasoft.net
12405 John Simpson Ct. voice/fax: (512)266-9991
Austin, TX 78732
__________________________________________________________
—
Adam Zegelin
Programmer/Web Designer
BearIsCoding
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden