Log in or register to post comments

Max size for renderer video bg screen?

September 6, 2011 - 4:11am #1

Hello,

For my iphone qcar app I wan't to take advantage of the retina displays and set my gl view content scale factor to 2. The problem is this creates a color render buffer backing store of 960 * 640. I create a VideoBackgroundConfig object with those same dimensions, however when I render it only shows the video screen taking up a small portion of the view. It looks like the default sizes for VideoBackgroundConfig are 480 * 360, it this also the max size, if not how can I make my video background screen larger?

Thanks
Brian

Re: Max size for renderer video bg screen?

September 6, 2011 - 7:49am #2
marchinram wrote:

For my iphone qcar app I wan't to take advantage of the retina displays and set my gl view content scale factor to 2.

Hi Brian,

I've successfully implemented a Retina enabled setup using ImageTargets by adding the following to EAGLView.mm:

In 'initWithFrame':

if (self) {
self.contentScaleFactor = 2.0;
CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;

In 'initApplication':

CGRect screen = [[UIScreen mainScreen] bounds];
screen.size.width *= self.contentScaleFactor;
screen.size.height *= self.contentScaleFactor;

ARData.screenRect = screen;

You may need to consider coordinate conversion if you are interacting with the screen.

Log in or register to post comments