SurfaceView 还是 GLSurfaceview?

发布于 2024-12-07 15:22:54 字数 212 浏览 6 评论 0原文

您好,请帮我决定是使用 SurfaceView 还是 GLSurfaceView。

我将为我的论文开发一个游戏,我已经知道如何使用 Canvas,但我不确定这是否可以处理至少 70 个精灵,而不会出现延迟或任何问题。顺便说一句,我只会开发 2D 游戏,所以请帮助莫决定!我应该学习 OpenGL 并使用 GLSurfaceView 还是可以使用 Canvas 来完成我的简单 2d 游戏,谢谢。

Hello there please help me to decide whether to use SurfaceView or GLSurfaceView.

I will be developing a game for my thesis and I already know how play with Canvas but I'm not sure if this can handle at least 70 sprites without lag or whatsoever problem. and BTW i will only developing 2d game so please help mo to decide !! Should i study the OpenGL and use GLSurfaceView or it's okay to use Canvas for my simple 2d game thanks.

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

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

发布评论

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

评论(1

东北女汉子 2024-12-14 15:22:54

在android中canvas实际上可以通过OpenGL进行硬件加速(因为skia)。

对于 70 个精灵,Canvas 和 GL 之间没有太大区别。 OpenGL 需要更多配置,但为您提供了更多优化绘图的方法。

In android canvas can be actually hardware-accelerated trough OpenGL (because of skia).

With 70 sprites there's no big difference between Canvas and GL. OpenGL requires more configuration, but gives you more ways to optimize drawing.

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