iPad 3 - Opengl Bug with Keagldrawablepropertyretainedbacking and Retina

ipad3 kEAGLDrawablePropertyRetainedBacking bug -- fixed in ios 6?

Ok, answered my own question: YES! Tried my app in iOS 6, latest beta, and it works as expected.

where to start with an OpenGL painter for the Retina display

I think that the starting point can still be GLPaint, only you need to set to NO hte value of kEAGLDrawablePropertyRetainedBacking and change the way you draw in your GL view.

GLPaint will only render to the gl buffer the strokes you draw by touching the screen, relying on kEAGLDrawablePropertyRetainedBacking to make the full buffer content retained. An alternative might be redrawing at each step the full content of the buffer. This would require keeping track of all the strokes that were drawn and kind-of "replay" them.

I suspect that in any serious painting app you would not rely on kEAGLDrawablePropertyRetainedBacking to retain the buffer content due both to performance and the need for managing you own data structure representing the painting (for anything like storing, sending the painting etc.) and would therefore implement your own solution for it.

iPad screen size always 1024x768, even on retina and Air

Uncommenting a line of code in AppDelegate.m as follows, allows you to set surface size 1536x2048; obviously you have to provide a valid "image~ipad-hd.png" file in your resources.

 // // Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
if( ! [director enableRetinaDisplay:YES] ) CCLOG(@"Retina Display Not supported");

The bad new is that in return, you'll get a totally black screen on ipad hires simulators; but I solved! Answers are already in stackoverflow here: Black screen on iPad retina display

You have to add another line of code like this as user Shamim Hossain's suggestion:

//  // Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
if( ! [director enableRetinaDisplay:YES] ) CCLOG(@"Retina Display Not supported");

[director setProjection:kCCDirectorProjection2D];

UIToolbar on top and interfaceOrientation out of sync in rotations using iPad..bug?

Although this does look like a bug, I have moved away from bar buttons and gone with popovers instead...in other words a re-think and re-design in the UI.

Detecting iPad processor/performance

Maybe you should try sysctl for this.

- (NSUInteger) getSysInfo: (uint) typeSpecifier
{
size_t size = sizeof(int);
int results;
int mib[2] = {CTL_HW, typeSpecifier};
sysctl(mib, 2, &results, &size, NULL, 0);
return (NSUInteger) results;
}

- (NSUInteger) cpuFrequency
{
return [self getSysInfo:HW_CPU_FREQ];
}

- (NSUInteger) busFrequency
{
return [self getSysInfo:HW_BUS_FREQ];
}

See Erica Sadun's UIDevice+Extension category (from which this code is extracted).



Related Topics



Leave a reply



Submit