Log in or register to post comments

glGetIntegerv(GL_VIEWPORT, viewport) is odd on iPhone

April 25, 2012 - 1:02am #1

I am trying to include "gluProject" in "Vuforia app".
However, viewport value as expected is unacquirable on iPhone.
The code which I used is as follows.
-----
GLint viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);
-----

I expected that "viewport= {0,0,480,320}" was acquirable.
However, the value which I have acquired was "viewport= {0, -20,480,360}."

In iPad2, it operated correctly.
"viewport= {0, 0, 1024, 768}" has been acquired on iPad2.

Why is "viewport= {0, -20,480,360}" acquired on iPhone?
(On "retina display", it becomes "viewport= {0, -40,960,720}".)

Since machine translation is used, there may be a mistake in English, but please forgive.

Re: glGetIntegerv(GL_VIEWPORT, viewport) is odd on iPhone

April 25, 2012 - 2:55am #2

I suspect it's to do with the status bar - you may need to experiment with making sure it's turned off at the correct point in the app.

Not sure why that's be different on iPad with the same code but it's not unknown for there to be differences like this that you have to work around per device, or iOS version.

Log in or register to post comments