"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Using external projector to show OpenGL EAGLView

Hi everybody,

i build an app that shows videos on top of the tags, and it works very well (I'm developing on iOS). But, now I want to show the EAGLView stuff on an external display but I can't. I slighly modified applicationDidFinishingLauchingWithOptions: like this:

 

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{

    QCARutils *qUtils = [QCARutils getInstance];

CGRect screenBounds ;

    if ([[UIScreen screens] count] > 1)

{

        // Associate the window with the second screen.

        // The main screen is always at index 0.

UIScreen*secondScreen = [[UIScreenscreens] objectAtIndex:1];

CGRectscreenBounds = secondScreen.bounds;

UIWindow *_secondWindow;

_secondWindow = [[UIWindowalloc] initWithFrame:screenBounds];

_secondWindow.screen = secondScreen;

         // Go ahead and show the window.

_secondWindow.hidden = NO;

window = _secondWindow;

}

else {

screenBounds = [[UIScreenmainScreen] bounds];

window = [[UIWindowalloc] initWithFrame: screenBounds];

}

    // Provide a list of targets we're expecting - the first in the list is the default

    [qUtils addTargetName:@"WonderBook" atPath:@"wonderbook.xml"];

    if(![[UIApplication sharedApplication] isScreenMirroringActive]){

        [[UIApplication sharedApplication] setupScreenMirroring];

}

    // Add the EAGLView and the overlay view to the window

    arParentViewController = [[VPParentViewController alloc] init];

    arParentViewController.arViewRect = screenBounds;

    [window insertSubview: arParentViewController.view atIndex:0];

    [window makeKeyAndVisible];

    [window layoutSubviews];

    return YES;

I'm using this simple library that works well but is too slow 'cause doesn't use OpenGL but every frames is captured and shown on both display.Is there a simpler way to show everything that happens on main screen ([UIScreen mainScreen]) directly on another external screen and draw on it?

Thanks in advance

Best regards.  

[quote=NalinS]

I guess the simplest way to achieve this is to run it on an iPad that is connected up to an external display via a simple cable.

... but maybe this is not what you want?

[/quote]

Yeah, exactly I have to use an iPhone (iPad should be too big)... 

Solved.
I had to disable the [UIScreen mainScreen] and add the EAGLView to the ViewController attached to the UIWindow *externalWindow.

So everything now is drawn on the external display. And best of all, I don't need external mirroring class anymore.