So of course the first thing I\'m trying on my new iPad (4g) is the old GLGravity example. The only modification I\'ve made is to set the target device to \"iPad\".
Howe
As an expansion on this answer, the GLGravity sample needs another change to ensure the GL viewport is set correctly. This is because thebounds
property returns Quartz points, not pixels.
-(void)setupView
{
...
CGRect rect = self.bounds;
// new code - modify the viewport dimensions.
rect.size.width *= self.contentScaleFactor;
rect.size.height *= self.contentScaleFactor;
// end of new code
glFrustumf(-size, size, -size / (rect.size.width / rect.size.height), size / (rect.size.width / rect.size.height), zNear, zFar);
glViewport(0, 0, rect.size.width, rect.size.height);
...
}