View Full Version : transparent OpenGL saver
Iceman
2002.07.01, 05:10 PM
I found this nifty code to make a screensaver transparent:
- (void)drawRect {
[[self window] setAlphaValue:0.0];
}
So how do you display OpenGL objects in this transparent view?
Thanks,
Iceman
GoodDoug
2002.07.01, 05:26 PM
Right now, OpenGL Contexts handle their own drawing and erasing and cannot composite over other views (this is for speed reasons).
Once QuartzExtreme hits mainstream, you will be able to composite OpenGL views over other views (especially in the way you are suggesting). But right now you are out of luck.
Iceman
2002.07.02, 05:16 PM
Yeah that's what I thought. How can the Fluid screen saver have alpha themes?
Iceman
Johan
2002.07.02, 07:24 PM
I don't know much about OSX, but since it's a screensaver (Quits when user does something), you might as well capture the screenbuffer and use that as a background in your app.
There should be some example code on apples site on how to do this.
Cheers,
Johan
Iceman
2002.07.03, 02:45 PM
Ah so that's how they do it! Thanks.
Iceman
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.