Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering is broken on iPad 3 (retina) w/ iOS 5.1 SDK #29

Open
WhiteNoise opened this issue Mar 16, 2012 · 9 comments
Open

Rendering is broken on iPad 3 (retina) w/ iOS 5.1 SDK #29

WhiteNoise opened this issue Mar 16, 2012 · 9 comments

Comments

@WhiteNoise
Copy link

Display is corrupted on the new iPad - probably something is using the wrong screen size somewhere.

@meeloo
Copy link
Member

meeloo commented Mar 16, 2012

ah shit. I don't have one :/. Can you send me a screenshot?

Thx!

Sebastien Metrot
Yasound - CTO - Cofounder
[email protected]

On Mar 16, 2012, at 7:19 PM, WhiteNoise wrote:

Display is corrupted on the new iPad - probably something is using the wrong screen size somewhere.


Reply to this email directly or view it on GitHub:
#29

@meeloo
Copy link
Member

meeloo commented Mar 16, 2012

Wow. Seriously broken indeed.

I need to find some time to check it out.

S.

On Mar 16, 2012, at 7:22 PM, Sebastien Metrot wrote:

ah shit. I don't have one :/. Can you send me a screenshot?

Thx!

Sebastien Metrot
Yasound - CTO - Cofounder
[email protected]

On Mar 16, 2012, at 7:19 PM, WhiteNoise wrote:

Display is corrupted on the new iPad - probably something is using the wrong screen size somewhere.


Reply to this email directly or view it on GitHub:
#29

@WhiteNoise
Copy link
Author

Yeah.. I'll take a look at it later tonight too. Apps compiled under the
older 4.2 SDK don't have the problem (I'm guessing the retina display is
disabled for those).

On Fri, Mar 16, 2012 at 2:28 PM, Sbastien Mtrot <
[email protected]

wrote:

Wow. Seriously broken indeed.

I need to find some time to check it out.

S.

On Mar 16, 2012, at 7:22 PM, Sebastien Metrot wrote:

ah shit. I don't have one :/. Can you send me a screenshot?

Thx!

Sebastien Metrot
Yasound - CTO - Cofounder
[email protected]

On Mar 16, 2012, at 7:19 PM, WhiteNoise wrote:

Display is corrupted on the new iPad - probably something is using the
wrong screen size somewhere.


Reply to this email directly or view it on GitHub:
#29


Reply to this email directly or view it on GitHub:
#29 (comment)

@meeloo
Copy link
Member

meeloo commented Mar 16, 2012

can you check if there is the same pbm with the simulator in "retina display for new iPad mode"?

On Mar 16, 2012, at 7:22 PM, Sebastien Metrot wrote:

ah shit. I don't have one :/. Can you send me a screenshot?

Thx!

Sebastien Metrot
Yasound - CTO - Cofounder
[email protected]

On Mar 16, 2012, at 7:19 PM, WhiteNoise wrote:

Display is corrupted on the new iPad - probably something is using the wrong screen size somewhere.


Reply to this email directly or view it on GitHub:
#29

@WhiteNoise
Copy link
Author

will do

On Fri, Mar 16, 2012 at 2:44 PM, Sbastien Mtrot <
[email protected]

wrote:

can you check if there is the same pbm with the simulator in "retina
display for new iPad mode"?

On Mar 16, 2012, at 7:22 PM, Sebastien Metrot wrote:

ah shit. I don't have one :/. Can you send me a screenshot?

Thx!

Sebastien Metrot
Yasound - CTO - Cofounder
[email protected]

On Mar 16, 2012, at 7:19 PM, WhiteNoise wrote:

Display is corrupted on the new iPad - probably something is using the
wrong screen size somewhere.


Reply to this email directly or view it on GitHub:
#29


Reply to this email directly or view it on GitHub:
#29 (comment)

@WhiteNoise
Copy link
Author

Unfortunately it does not happen in the simulator :/

What it looks like to me is that everything in the backing buffer (ie,
everything that does not need to be redrawn) is getting scaled down and
shifted to the right every frame. Like it if it was getting drawn into a rectangle that
is 1,0,2047,1536 instead of 0,0,2048,1536

Setting EnablePartialRedraw(false) fixes the glitch so that may atleast be
a temporary solution. I'm gonna keep digging around.

-Dave

On Fri, Mar 16, 2012 at 2:58 PM, David Wallin [email protected] wrote:

will do

On Fri, Mar 16, 2012 at 2:44 PM, Sbastien Mtrot <
[email protected]

wrote:

can you check if there is the same pbm with the simulator in "retina
display for new iPad mode"?

On Mar 16, 2012, at 7:22 PM, Sebastien Metrot wrote:

ah shit. I don't have one :/. Can you send me a screenshot?

Thx!

Sebastien Metrot
Yasound - CTO - Cofounder
[email protected]

On Mar 16, 2012, at 7:19 PM, WhiteNoise wrote:

Display is corrupted on the new iPad - probably something is using the
wrong screen size somewhere.


Reply to this email directly or view it on GitHub:
#29


Reply to this email directly or view it on GitHub:
#29 (comment)

@meeloo
Copy link
Member

meeloo commented Apr 15, 2012

Hey David,

I have just put my hands on the new iPad.
I investigated the problem and found this: http://stackoverflow.com/questions/9753230/ipad-3-opengl-bug-with-keagldrawablepropertyretainedbacking-and-retina
Which is exactly what we are seeing there.
Among the solutions the first that came to my mind was to rewrite the rendering code so that it renders to an offline texture instead of the back buffer but doing this will take time (and I'm quite short on time right now).
I have another possible solution which doesn't involve turning off partial redraw (which might kill you perfomance wise) but turning of retina support. You can check out how it would look by forcing it:

got to nui3/src/Window/iOS/nglVideoMode_UIKit.mm line 102 & replace

float nuiGetScaleFactor()
{
  if (gScaleFactor == 0)
  {
    gScaleFactor = [UIScreen mainScreen].scale; 
  }

  return gScaleFactor;
}

With:

float nuiGetScaleFactor()
{
  if (gScaleFactor == 0)
  {
//    gScaleFactor = [UIScreen mainScreen].scale; 
    gScaleFactor = 1.0f; 
  }

  return gScaleFactor;
}

We can wish that apple will fix this in the next OS update (and hope they don't wait too long...).

S.

@WhiteNoise
Copy link
Author

Hi Sébastien, that definitely sounds like the bug.

Performance doesn't seem too bad, even with partial redraw off. I'm fine
waiting for apple to (hopefully) fix the bug. I'd rather not disable retina
mode, since it looks much better with retina display and I already created
all the retina graphics.

-Dave

On Sun, Apr 15, 2012 at 5:37 PM, Sébastien Métrot <
[email protected]

wrote:

Hey David,

I have just put my hands on the new iPad.
I investigated the problem and found this:
http://stackoverflow.com/questions/9753230/ipad-3-opengl-bug-with-keagldrawablepropertyretainedbacking-and-retina
Which is exactly what we are seeing there.
Among the solutions the first that came to my mind was to rewrite the
rendering code so that it renders to an offline texture instead of the back
buffer but doing this will take time (and I'm quite short on time right
now).
I have another possible solution which doesn't involve turning off partial
redraw (which might kill you perfomance wise) but turning of retina
support. You can check out how it would look by forcing it:

got to nui3/src/Window/iOS/nglVideoMode_UIKit.mm line 102 & replace
float nuiGetScaleFactor()
{
if (gScaleFactor == 0)
{
gScaleFactor = [UIScreen mainScreen].scale;
}

return gScaleFactor;
}

With:
float nuiGetScaleFactor()
{
if (gScaleFactor == 0)
{
// gScaleFactor = [UIScreen mainScreen].scale;
gScaleFactor = 1.0f;
}

return gScaleFactor;
}

We can wish that apple will fix this in the next OS update (and hope they
don't wait too long...).

S.


Reply to this email directly or view it on GitHub:
#29 (comment)

@mathieugarcia
Copy link

Still not fixed as of iOS 5.1.1, thank you Apple.
Some official discussion here: https://devforums.apple.com/message/635463#635463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants