transparent OpenGL saver

Member
Posts: 196
Joined: 2002.04
Post: #1
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
Quote this message in a reply
Member
Posts: 104
Joined: 2002.04
Post: #2
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.
Quote this message in a reply
Member
Posts: 196
Joined: 2002.04
Post: #3
Yeah that's what I thought. How can the Fluid screen saver have alpha themes?

Iceman
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2009.01
Post: #4
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
Quote this message in a reply
Member
Posts: 196
Joined: 2002.04
Post: #5
Ah so that's how they do it! Thanks.

Iceman
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Transparent textures kordeul 2 2,683 Aug 27, 2007 01:38 AM
Last Post: kordeul
  OpenGL, SDL, and Transparent Bitmaps RyanA 4 4,105 Jun 26, 2006 04:26 PM
Last Post: RyanA
  SpaceTime 3D Screen Saver (Free Source Code) ppinter1 11 5,697 Jan 4, 2004 03:06 PM
Last Post: arekkusu
  OS X Screen Saver help Iceman 2 3,650 May 25, 2002 11:04 AM
Last Post: Iceman
  Transparent Color? Josh 6 5,947 Apr 22, 2002 05:27 AM
Last Post: Josh