Thank you very much.
This code helped me to create the first prototype. I'm now able to
create a one second space-time distortion with 25 simultanious frames.
The code left me with a lot of questions though, but for now I like
to concentrate on the following.
I managed to switch the resolution of the screen to 640 x 480 with this code:
CGDisplayCapture(kCGDirectMainDisplay);
CGDisplaySwitchToMode( kCGDirectMainDisplay,
CGDisplayBestModeForParameters( kCGDirectMainDisplay,
32, 640, 480, 0 ) ) ;
_screenSize.width = CGDisplayPixelsWide(kCGDirectMainDisplay);
_screenSize.height = CGDisplayPixelsHigh(kCGDirectMainDisplay);
This works fine, but for some reason I get a very strange
mouselocation in my quartzcomposition from this code already in the
sample code.
mouseLocation = [NSEvent mouseLocation];
mouseLocation.x /= _screenSize.width;
mouseLocation.y /= _screenSize.height;
arguments = [NSMutableDictionary dictionaryWithObject:[NSValue
valueWithPoint:mouseLocation] forKey:QCRendererMouseLocationKey];
I work with a powerbook with a max resolution of 1280 x 854 and
somehow this infuences the mouseLocation. If I look at the original
mouseLocation once I haved switched to 640 x 480 it has a X-range of 0
to 1280 and a Y range of 560 to 1280.
How can I manage to get the location of the mouse right?
greetings,
Matthias
On 11/1/05, Pierre-Olivier Latour <email@hidden> wrote:
> > Is the a way to use the video buffer in Quartz Composer as used in the
> > QTQuartzPlayer Sample Code. (
> > http://developer.apple.com/samplecode/QTQuartzPlayer/
> > QTQuartzPlayer.html
> > )
> > What I'd like to do is putting 10 or so frames of a video behind
> > eachother and play with their transparancy. For instance using the
> > mouse location to generate a decreasing 'hole" in the front frames to
> > create a cool space-time effect.
> > I'm pretty advanced in using Quartz Composer, but I didn't eat cheese
> > (excuse me for my duch expression) of the programming around it.
>
> You might wanna have a look at this sample code:
> http://developer.apple.com/samplecode/QuartzComposerMatrix/
> QuartzComposerMatrix.html
>
> ________________________________________________________
> Pierre-Olivier Latour email@hidden
> Quartz Composer Architect Graphics & Imaging Team
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden
This email sent to email@hidden