Problems displaying full-screen CAEAGLLayer on Retina iPad

I'm having trouble getting a UIView with a large CAEAGLLayer to display correctly. If the frame exceeds a certain size (apparently 768 in any dimension with contentScaleFactor 2.0), it is redrawn with a distorted image of previous versions of the buffer.

This is fairly easy to reproduce in the Apple GLPaint example. PaintingView.m has hardcoded contentScaleFactor 1.0, but if you change it to 2.0:

self.contentScaleFactor = 2.0; 

and run it on the iPad Retina (and not on the simulator), you will get something like this when you draw:

http://imgur.com/jPNqV

+3
source share
1 answer

This seems to be a bug with setting kEAGLDrawablePropertyRetainedBacking to YES on iPhone Retina, as Orion reports in this question . Setting for NO with

  eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil]; 

deletes the thumbnail, but GLPaint relies on the saved support for its brushes, so this will not work correctly if you do this.

I published an error report (rdar: // 11070429) with a modified GLPaint as a test application for this behavior.

+5
source

All Articles