Jaguar Fun :)

ededed
Unregistered
 
Post: #16
Quote:The desktop screensaver I wanna see is something that looks like the default XP grassy hills desktop, but slowly flys over it . Maybe scatter a few DogCows around on the peaks and valleys.

Something like the Pop-Pop ripples could work too.


I dont have jaguar, but I heard that you wont find the dogcow (Moof/Cedric) in print settings anymore. Ill see what I can do about Pop-Pop ripples background application though.

Please check out SpaceGoon and JellyMouse
http://www.geocities.com/ed72678954/index.html
http://www.geocities.com/ed72678954/JellyMouse.tgz

p.s. what are the modifiers you use in the terminal to get the screen saver engine to not quit when you move the mouse. We worked out -debug to get it in the background.

Laters!
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #17
Quote:Originally posted by ededed
Ill see what I can do about Pop-Pop ripples background application though.
I was thinking the water could be an opengl mesh and instead of just displaying the height as a gradient from say, dark blue to white, you could move each vertex up and down... and throw in a nice reflection map of say some light clouds or something. It'd be cool if that could be altered in the preferences.

And I was also thinking that the resolution of the mesh could be altered in the preferences. The nice thing about doing it in opengl as opposed to how pop-pop does it is that when there is a low resolution of vertices... I would think it wouldn't look quite as blocky. There is plenty of source showing how to do the ripple effect on a height map. I haven't done much opengl programming but I bet there would be a quick way to apply the map to a mesh.

-Jon
Quote this message in a reply
furballphat
Unregistered
 
Post: #18
Quote:Originally posted by Iceman
Well it's more like 15 files at a time and you can rotate the camera ya knowGrin. Honestly I think it's easier to navigate since you can select any directory that's open at any time. Also you can use it as a screensaver and it's free. Finally I didn't say it was finished, but it's still kinda cool to check out anyway.

Iceman

Although you can see 15 icons, the title can be read for about 4 of them (the rest are skewed) and the opening directories that are open is no better than the Finders column view.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #19
I found these functions:

Code:
void NSCountWindows(int *count)
void NSWindowList(int size, int list[])

But no way to actually find out more about a window (like, say, its bounds Smile) given only its int...

Anyone know anything about this? Can you do it in Carbon?
Quote this message in a reply
Member
Posts: 145
Joined: 2002.06
Post: #20
Quote:Originally posted by ededed
p.s. what are the modifiers you use in the terminal to get the screen saver engine to not quit when you move the mouse. We worked out -debug to get it in the background.
-background is all it takes.

"He who breaks a thing to find out what it is, has left the path of wisdom."
- Gandalf the Gray-Hat

Bring Alistair Cooke's America to DVD!
Quote this message in a reply
ededed
Unregistered
 
Post: #21
Claris is the dogcow that print settings has lost.

I dont know but I think that -background is a Jagwyre+ (10.2) thing only but I will check soon.
Another thing you could do with -background screen savers is use the mouse as a sparkler or have the screen bleed.

Please please check out SpaceGoon and JellyMouse
http://www.geocities.com/ed72678954/index.html
http://www.geocities.com/ed72678954/JellyMouse.tgz
Quote this message in a reply
Feanor
Unregistered
 
Post: #22
Quote:Originally posted by ylaporte
The artifacts no longer appear if you remove the empty space around the custom OpenGL view. I mean by that to stretch the OPenGL view in interface builder so it occupies the whole window.

Seems like these weird appearances are caused by the window frame somehow being draw inside the openGL context... Strange...

Every window has two layers: a backing store for OpenGL and another layer for window widgets. You can control which one appears above which. But clearing the glcontext doesn't clear the Aqua UI layer. If this sounds vague, its because I'm trying to remember stuff from WWDC which was rather vague to me at the time, and which I haven't explored further. When the window is resized, the Aqua layer needs to be redrawn at full transparency every time to eliminate bits of the previous Aqua stuff that wasn't transparent. Making the glview bigger will fix most of the problem, I bet. Making the window programmatically with no widgets would also be good.

edit: minimize the window to get an intuitive feel for what I'm talking about Smile.

Ken Dyke at Apple had a couple demos with a transparency preference panel which did this business, but he didn't resize the window ;-).

--FÎanor
Quote this message in a reply
Feanor
Unregistered
 
Post: #23
Quote:Originally posted by OneSadCookie
I found these functions:

Code:
void NSCountWindows(int *count)
void NSWindowList(int size, int list[])

But no way to actually find out more about a window (like, say, its bounds Smile) given only its int...

Anyone know anything about this? Can you do it in Carbon?

I have no idea what you're talking about, actually. Is this related to transparent 3D windows, animated desktops, or what? -- F
Quote this message in a reply
Feanor
Unregistered
 
Post: #24
Quote:Originally posted by OneSadCookie
If you have Jaguar, try the following:

Download the GLCubes source code from this site.

In MyCustomGLView.m, make these changes:

Add these lines to the end of -awakeFromNib:

Code:
[[self window] setOpaque:NO];
[[self window] setAlphaValue:1.0f];

Add these lines just before [font=monaco,courier][[self openGLContext] makeCurrentContext];[/font] in -initWithFrame::

Code:
long transparent = 0;
[[self openGLContext] setValues:&transparent forParameter:NSOpenGLCPSurfaceOpacity];
;

Compile, run, & enjoy. You have to resize or minimize/maximize the window to see the effect (haven't figured out what I need to do to make it work straight off).

You're going to kick yourself OSC!

If you want to make this a bit simpler, instead of setting the window's alpha, change its backgroundColor:
[[self window] setBackgroundColor:[NSColor clearColor]];

Then, the thing I'm surprised you missed, remember that your custom NSView must override isOpaque.:
-(BOOL) isOpaque {

return YES;
}

Now there's no need to resize the window to get immediate transparency. Ciao -- FÎanor
Quote this message in a reply
Feanor
Unregistered
 
Post: #25
If you send this message to a window:

Code:
    [[self window] setLevel:CGWindowLevelForKey(kCGDesktopWindowLevelKey)];
It will run behind your desktop icons.

Now I think I can easily figure out how to have no menus and to get rid of the window title bar, but I can't remember how to make the application not show up in the dock.

--FÎanor
Quote this message in a reply
Feanor
Unregistered
 
Post: #26
[Image: 3d%20background%20window%20copy.jpg]

OK, there's the cubes running underneath with no window. This was a bit weird, cause I put the view in the nib without a window, and then the view created its own window and set itself to the window's content view. Bootstrap thyself!

So now we have a new way to distract ourselves. -- FÎanor

(PS: I'll post the modified source if requested.)
Quote this message in a reply
Feanor
Unregistered
 
Post: #27
Quote:Originally posted by ededed


I dont have jaguar, but I heard that you wont find the dogcow (Moof/Cedric) in print settings anymore.

Eventually I knew I'd come back to this issue. Clarus is the dogcow's name, and no, she apparently did not like to be in close proximity to Jaguar. All things must unfortunately come to an end.

But wait! Apple continues to track the history of the dogcow on the developer support page.

Moof!

--FÎanor
Quote this message in a reply
ededed
Unregistered
 
Post: #28
Thanks for:

[[self window] setLevel:CGWindowLevelForKey(kCGDesktopWindowLevel
Key)]

that will run faster and probably run on non-jaguar computers but I have jaguar now and the shader builder is cool, has anyone made any shaders yet, here is one I made:

Code:
!!ARBvp1.0

PARAM lightPosition = { 0.2, -0.4, 0.8 };

PARAM lighten = { 0.6, 0.6, 0.6, 1  };
PARAM darken = { 0.3, 0.3, 0.3, 1  };

# This rotates and moves all the vertices of an object properly
DP4 result.position.x, state.matrix.mvp.row[0], vertex.position;
DP4 result.position.y, state.matrix.mvp.row[1], vertex.position;
DP4 result.position.z, state.matrix.mvp.row[2], vertex.position;
DP4 result.position.w, state.matrix.mvp.row[3], vertex.position;

# Some variables
TEMP myColor, myColor2, myColor3;

# Find the Dot product of the current vertices normal to the lightPosition
# (that is how lighting is done)
DP3 myColor2, vertex.normal, lightPosition;

# Multiply the color variables the darken or lighten them
MUL myColor3, myColor2, darken;
MUL myColor2, myColor2, lighten;

# set myColor the whatever color is set by "GL Parameters"
MOV myColor, vertex.color;

# The next two lines work together to lighten and darken the right areas
ADD myColor, myColor, myColor2;
SUB myColor, myColor, myColor3;

# Set the result to myColor and pass the texture stuff through
MOV result.color, myColor;
MOV result.texcoord, vertex.texcoord;
END


There is a nice lighting system that allows textures.
Who knows of a fast ripple algorithm to use for a pop-pop style background?
Quote this message in a reply
ededed
Unregistered
 
Post: #29
Also seems like the right part of the menubar is a pretty good place for information, but how do you write an application that runs there, like that apple menu extras. Volume, Clock, Battery Power that kind of thing. They are very like control strip extras.
Quote this message in a reply
Member
Posts: 304
Joined: 2002.04
Post: #30
Quote:Originally posted by ededed
Also seems like the right part of the menubar is a pretty good place for information, but how do you write an application that runs there, like that apple menu extras. Volume, Clock, Battery Power that kind of thing. They are very like control strip extras.

I use Application Switcher Menu (http://www.vercruesse.de/) which brings back the OS9 app menu in the right part of the menubar. The source code for it is at http://x-asm.sourceforge.net/ - so that should provide some clues as to how the voodoo is pulled off. I have a much smaller, simpler example somewhere (although it never worked quite right) and if I can find that Ill post it.

Of course if you find ASM as useful as I do make sure to register/donate.

hth,
Codemattic
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  openGL and Jaguar zzajin 4 3,908 Aug 29, 2002 01:29 PM
Last Post: furballphat