在 Android 上检测良好的 GPU

发布于 2025-01-02 19:19:30 字数 177 浏览 7 评论 0原文

我正在寻找一种安全的方法来检测当前的 GPU 是否属于当前的高端配置(例如摩托罗拉的 Atrix 或 Galaxy s2),以便我可以在运行时在我的游戏中启用一些更复杂的视觉效果。

有没有人成功做过类似的事情?我考虑过检测双核 CPU,它通常会配备一个好的 GPU,但我没有足够的设备来测试它是否在大多数情况下都能正常工作。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

墨小沫ゞ 2025-01-09 19:19:30

如果那些“更复杂的视觉效果”需要 OpenGL ES 扩展,您可以简单地测试这些扩展是否存在。

如果他们不这样做,从长远来看,简单地允许用户配置他们的图形设置可能会更好。否则,如果出现新的 GPU,它不会出现在您的 GPU 硬编码列表中,因此它们将获得低质量的图形。

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.

姐不稀罕 2025-01-09 19:19:30

Android 位于 Linux 内核之上,您是否考虑过按顺序读取并解析 /proc/cpuinfo 文件?

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

給妳壹絲溫柔 2025-01-09 19:19:30

由于我正在制作应用程序而不是游戏,因此我需要自动配置最佳配置。对于纹理的大小,我测试了堆大小和已用堆。如果在软件模式(PixelFlinger)下运行,还有小纹理。

如果它有大量的可用堆和 2 个 cpu,那么我会在 OpenGL 2.0 中使用 AA 运行 3d 引擎。到目前为止,这对于我们拥有的设备数量来说效果很好。

注意:我注意到有些手机 ROM 报告 1 个 cpu 空闲,而实际上有 2 个。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文