I use OpenGL ES 1.1 from native code on Android. In some places, I use glClipPlanef() to clip some things. The code for the clipping is:
GLfloat clip[4] = { 0, -1, 0, 0.2 };
glEnable(GL_CLIP_PLANE0);
glClipPlanef(GL_CLIP_PLANE0, clip);
<draw things>
glDisable(GL_CLIP_PLANE0);
This clips out everything upward on the y-axis.
This works fine when I test on a HTC Gratia (Android 2.2) and on a Galaxy Nexus (Android 4.3).
But, when I test this on a Nexus 4 (Android 4.3), the clipping doesn't work. To make it work there, I have to change the equation parameters to:
GLfloat clip[4] = { -1, 0, 0, -0.02 };
It seems like the X and Y axis are reversed for the clipping on the Nexus 4. All the drawing is still the same as for other devices, this only affects the clipping.
Does anyone know why this happens? Is it something specific for the Adreno 320 GPU in the Nexus 4? How can I properly support all devices, if the clipping works differently on different devices?
Unfortunately, I don't have the possibility to just change to OpenGL ES 2.0, it's too much work at this point in the project. Could this be something in the OpenGL ES 1.1 emulation in Android?
Edit: Just confirmed that the new Nexus 7 (2013 edition) also has the same incorrect clipping issue. It also has the Adreno 320 GPU.