• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quickest Drawing Method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Quickest Drawing Method
      • From: Uli Kusterer <email@hidden>
  • Prev by Date: Re: Saving images to MySQL
  • Next by Date: Re: ASScriptMenuManager
  • Previous by thread: Re: Quickest Drawing Method
  • Next by thread: Re: Quickest Drawing Method
  • Index(es):
    • Date
    • Thread