Re: Quickest Drawing Method
Re: Quickest Drawing Method
- Subject: Re: Quickest Drawing Method
- From: spiderlama <email@hidden>
- Date: Sun, 22 Jul 2007 22:18:52 +1000
If that's an option for you (i.e. you feel comfortable with it), I'd
definitely use OpenGL calls: it's quite well integrated with Cocoa
(that I assume it's a requirement, as you're posting to this list),
you have a lot of options for compositing, and a lot of control on
getting things on the screen as fast as possible.
My current situation is that I have a custom NSWindow with a single
custom view in it. I do my drawing in the view's drawRect function.
The drawing consists of:
- stretching a couple of images to size and drawing them
- applying a mask image (I think using a NSBezierPath to make the
mask image would be quicker than using a black and transparent PNG
file).
This all happens when I call setFrame for the custom window. Is
OpenGL still viable for an odd-shaped image (not rectangular; with
transparencies)? Or by using Quartz and CG* functions is that the
same as OpenGL?
There are far more windows on the screen than a user can perceive: try
the Quartz Debug's 'Show Window List' command to see what I mean. And,
yes, the Dock has its windows (and quite a lot of them) too.
Yeah I checked it out. There's a window for each icon plus more! Crazy.
Right now I have a "scheduledTimerWithTimeInterval:0.1" that calls a
function that just updates the custom window's size; this is quite
draining on the resources as well as jumpy. What can I do to get this
resize function called a lot, but without killing the system? Maybe a
run loop callback?
Cheers
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden