Mailing Lists: Apple Mailing Lists

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

Re: Annoying CGDisplayCapture Fades?



If I was in your shoes, I would create a 1024x512 OpenGL texture. You can
even make an 8 bit texture with a CLUT if you want, but I recommend a 32 bit
texture. Draw your game in the lower left 640x480 of the texture. Use
OpenGL to update the texture. This works fine for full screen 640x480 and
will work happily in a window with a 640x480 content rect. Use texture
coordinates to map the lower left 640x480 to a 640x480 quad drawn with an
identity ortho matrix.

The OpenGL drivers will make sure bus is used efficiently. Drawing into the
32 bit texture is just a matter of translating colors through your existing
CLUT or you can use an 8 bit texture but it will actually be slower I
suspect.

We ported a 16 bit 2D game using this technique and it was the fastest
technique in both performance and development time that we have found. This
should work fine even on early iMacs. We do not see flickering or other
problems when switching to full screen OpenGL and back.
_______________________________________________
mac-games-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mac-games-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Annoying CGDisplayCapture Fades? (From: Zack Morris <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.