Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quartz from a thread



I've got a threaded Carbon game which does all its drawing offscreen, then does a final CopyBits.

It would be far more convenient if the drawing could be in a thread, so I'm trying to move to Quartz. Instead of a GWorld, I make a CGImage. Drawing goes (via CGBitmapContextCreate) to this, and I eventually copy it to the window with CGContextDrawImage.

But nothing was really drawing, so I'm playing around with CGContextSynchronize or QDFlushPortBuffer. My window is now (usually) redrawn, but when I turn on Quartz Debug, it appears that any change now dirties the entire window. I've tried QDSetDirtyRegion -- I get my region flashed AND the entire window.

So I'm probably missing some trick relating to drawing from a thread, though possibly it's something related to Quartz coordinates or flushing in general.

I didn't see anything relevant in the "Transitioning to Quartz 2D" document, or the list archives. Does anyone have general tips?
--


David Dunham     A Sharp, LLC
Voice/Fax: 206 783 7404     http://a-sharp.com
Efficiency is intelligent laziness.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.