openGL ES retina support
- by Bryan
I'm trying to get the avTouch sample code app to run on the retina display. Has anyone done this?
In the CALevelMeter class, I've tried the following:
- (id)initWithCoder:(NSCoder *)coder {
if (self = [super initWithCoder:coder]) {
CGFloat f = self.contentScaleFactor;
if ([self respondsToSelector:@selector(contentScaleFactor)])
{
self.contentScaleFactor = [[UIScreen mainScreen] scale];
}
f = self.contentScaleFactor;
_showsPeaks = YES;
_channelNumbers = [[NSArray alloc] initWithObjects:[NSNumber numberWithInt:0], nil];
_vertical = NO;
_useGL = YES;
_meterTable = new MeterTable(kMinDBvalue);
[self layoutSubLevelMeters];
[self registerForBackgroundNotifications];
}
return self;
}
and it sets the contentScaleFactor to "2". Great, that was expected. But then in the layoutSubviews, CALevelMeter frame is still 1/2 of what it should be.
Any ideas?