I am getting unexpected results when using glPolygonOffset on PowerVR SGX 540 (Samsung Galaxy Tab 2, Kindle Fire HD 7). It seems that I have to negate the 2 values I pass to the glPolygonOffset function to get the same visual result as on iOS devices (PowerVR SGX 543 for example) or other Android devices.
While I can imagine OEMs probably tweak drivers on their end, I was wondering if you guys have seen this issue and if you can suggest a robust workaround (beside having a different rendering path based on OpenGL Renderer String or device name).
Thank you in advance
Sorry for not answering this question sooner. I’ve not heard of this issue before. I’ll talk to our driver team to see if this is a known problem. Unfortunately, using the GL_RENDERER string is likely to be the best way to workaround the problem.
Can you share the GPU driver version number with us? As explained here, this can be queried with 'cat /proc/pvr/version’
I’ve spoken to our driver team & also referred to the OpenGL ES 2.0 spec. Annoyingly, there is no standardized direction to apply the depth offset in, which means the offset direction is implementation dependent. The direction we chose allows us to pass the OpenGL ES 2.0 conformance tests & also causes Quake 3 to render correctly.
Can you explain your use case for using this feature? I’d recommend translating your objects along the Z axis yourself to ensure you get a consistent result across all of the devices you’re targeting.