Reputation: 39
I came across a problem with the Nexus 5 running Android version 5.1.1. No other device running that version has had this problem. I am using the NDK and OpenGL ES 1.1.
The problem image is the first one, where the image has some sort of interlacing issue. The second is what the image should look like. I have no idea what could be causing this. (Both images had most of the source textures smeared for testing on a cloud service.) Can anyone tell by looking at the first image what could be going wrong? Any insight would help.
(I can't post images because I don't have enough rep!)
Broken: http://postimg.org/image/kuvw7esz9/
Working: http://postimg.org/image/b5ulyf0uz/
Edit: I'm not doing any post-processing or anything fancy. Here's another image of the broken device. The interesting thing here is the dark red is the clear color, so the black should be red if it was properly rendering to the whole surface. And it's not a straight line at the bottom, it's like the stride is wrong or something.
Another broken image http://postimg.org/image/nrcz7wxj3/
Upvotes: 1
Views: 480
Reputation: 39
The problem was due to the order in I was initializing gl. I never saw any initialization errors throughout this and it was very strange how it was only present on one device/OS version.
Borked
surface = eglCreateWindowSurface(display, config, window, NULL);
eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &format);
ANativeWindow_setBuffersGeometry(window, 0, 0, format);
Fixed
eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &format);
ANativeWindow_setBuffersGeometry(window, 0, 0, format);
surface = eglCreateWindowSurface(display, config, window, NULL);
Upvotes: 1