Log in or register to post comments

Flip Video Background

August 5, 2011 - 5:03pm #1

I'm using QCAR in an iPad application (in portrait mode) and the video background is always oriented incorrectly. Even if I physically rotate the device, the video simply rotates with the device (obviously) and is still incorrect. All I am doing to draw the background is call QCAR::Renderer::getInstance().begin() and I don't think this call uses the modelview matrix so I can't just rotate with glRotate. When I set the video background config, I have tried setting many combinations of width and height, but they all result in the video size changing without the orientation changing. How can I rotate the video background?!

To be clear on the problem: If I hold my device in portrait mode looking at a vertical line, the line is horizontal in the video background, and if I hold the device landscape, the (now horizontal) line is rendered vertical.

Edit: Also want to throw a shoutout to the QCAR developers in this post. Besides this one little hiccup, this library has been absolutely phenomenal. Amazing job and by far the best mobile AR lib I've found!

Flip Video Background

May 24, 2016 - 3:19am #8

what about on Android?


Flip Video Background

December 20, 2014 - 2:46am #7

How can I do this in unity???

In the generated Xcode project I don't have access to the EAGLView class (or if I do, I'm not seeing it).

Is there a native way of setting this in Unity?

Flip Video Background

August 1, 2014 - 7:36am #6

Guys, can you explain a little in depth how to fix this issue? what shoud I modify? wich script exactly? Im working in Unity


Re: Flip Video Background

September 17, 2011 - 10:50am #5

It worked as expected.

Thanks to Nitrex88 for posting the fix and Kim for explaining where and how to implement the code.


Re: Flip Video Background

September 13, 2011 - 4:22pm #4

Try adding that flag to the setInitParameters call in EAGLView.mm:

QCAR::setInitParameters(ARData.QCARFlags | QCAR::ROTATE_IOS_90);

- Kim

Re: Flip Video Background

September 12, 2011 - 6:13pm #3

Hello Nitrex88,
Can an example be posted?
Im not sure how to do what you mentioned.


Re: Flip Video Background

August 5, 2011 - 9:19pm #2

I figured it out. In the setInitParameters method you can pass in a QCAR::ROTATE_IOS_90 flag. Everything is working now.

Log in or register to post comments