SurfaceView 还是 GLSurfaceview?
您好,请帮我决定是使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在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.