Detecting good GPU on Android

2019-08-15 06:20发布

I am looking for a safe way to detect whether the current GPU belongs to the current high end profile (such as Motorola's Atrix or Galaxy s2) so I can, in run-time, enable some more sophisticated visual effects in my game.

Has anyone successfully done anything similar? I though about detecting dual-core CPU, which would usually come with a good GPU, but I don't have enough devices to test if it is going to work OK on most situations.

4条回答
We Are One
3楼-- · 2019-08-15 06:42

Android being above a Linux kernel, did you consider reading sequentially and parsing the /proc/cpuinfo file ?

查看更多
ゆ 、 Hurt°
4楼-- · 2019-08-15 06:52

If those "more sophisticated visual effects" require OpenGL ES extensions, you can simply test for the presence of those extensions.

If they do not, it would probably be better in the long run to simply allow the user to configure their graphics setup. Otherwise, if a new GPU comes out, it won't be on your hard-coded list of GPUs and thus they'll get low-quality graphics.

查看更多
【Aperson】
5楼-- · 2019-08-15 06:57

Since I'm making an application not a game, I need to auto configure what is best. For the size of the textures I test for heap size and used heap. Also small textures if running in software mode (PixelFlinger).

If it has good amount of heap free and 2 cpus then I run the 3d engine in OpenGL 2.0 with AA. So far this works great with the amount of devices we have.

Note: I have noticed that some phone roms report 1 cpu free when there is 2.

查看更多
登录 后发表回答