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
You might try drawing your graphics from your main thread, or if in
another thread, use
some of the MP API calls like EnterCriticalRegion(); do_some_drawing();
ExitCriticalRegion(); Etc.
Look in the Multiprocessing Documentation to get some MP foundation on
apple developers web site
and I'm sure you'll solve your problem. Just takes patience and time to
find and test the method that
works best for your situation. Have fun and be creative.
_______________________________________________
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