I am currently porting a 3D C ++ game from iOS to Android using the NDK. Rendering is done using GLES2. When I finished rewriting all the platform-specific things and first launched the full game, I noticed errors during processing - sometimes only parts of the geometry appeared, sometimes huge triangles flickered around the screen, etc. Etc....
I tested it on a Galaxy Nexus 4.1.2. glGetError() returns nothing. In addition, the game worked perfectly on all iOS devices. I began to suspect a driver error and after hours of hunting I found out that using VAO ( GL_OES_vertex_array_object ) caused problems. The same renderer worked perfectly without HLW and produced garbage from HLW.
I found this error report in Google Code . I also saw the same report on IMG forums , and an employee confirmed that this is really a driver error.
All this made me wonder - how can I handle cases of confirmed driver errors? I see 2 options:
- Do not use VAO on Android devices.
- Blacklist individual devices and driver versions rather than using VAO on these devices.
I do not like both options.
Option number 1 will penalize all users who have a good driver. VAOs really improve performance, and I think itโs very bad to ignore them, because one device has an error.
Option number 2 is quite difficult to do correctly. I can not test every Android device for broken drivers, and I expect the list will be constantly changing, which makes it difficult to work.
Any suggestions? Is there a way to detect such driver errors at runtime without manually testing each device?
source share