• 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: How to do Blitters in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to do Blitters in Cocoa


  • Subject: Re: How to do Blitters in Cocoa
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Fri, 17 Oct 2003 22:49:09 +0100

On Friday, October 17, 2003, at 09:37 pm, Lee A Morgan wrote:

Hi all I posted this to the mac-games-dev list and didn't get much help so I figured its pretty close to general app direct pixel access.

What's the "proper" way to do a custom blit in Cocoa (that is not using QuickDraw, OpenGL or Quartz).

If you want to take-over the entire display, you could do worse than the CGDirectDisplay API, documented in

http://developer.apple.com/technotes/tn/tn2007.html

You might also try the Quartz 2D APIs, in particular

CGBitmapContextGetData()

looks like it might be of use. (You can get a Quartz CGContextRef by doing [[NSGraphicsContext currentContext] graphicsPort] with the appropriate view locked.)

Another approach you could take is to use the ordinary Quartz/Cocoa image drawing APIs, but disable antialiasing, reduce the interpolation quality and experiment with the number of bytes per line in your images; I suspect Apple have gone to some lengths to optimise Quartz' blitting, so it wouldn't surprise me if it is actually fast enough to do what you want, provided your images are in the right format and it doesn't have to scale them or antialias them.

Or, alternatively, just stick with what you know and use Carbon.

It might not be a bad idea to post this question on the Omni Group macosx-dev list, given that they develop games software as well and are likely to know exactly which techniques will be best for whatever you want to do.

Kind regards,

Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >How to do Blitters in Cocoa (From: Lee A Morgan <email@hidden>)

  • Prev by Date: How to do Blitters in Cocoa
  • Next by Date: Re: How to do Blitters in Cocoa
  • Previous by thread: How to do Blitters in Cocoa
  • Next by thread: Re: How to do Blitters in Cocoa
  • Index(es):
    • Date
    • Thread