android open gl真的比canvas慢吗? [英] android open gl really slower than canvas?

查看:20
本文介绍了android open gl真的比canvas慢吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试 android SpriteMethodTest 并且在默认设置下画布获得 58fps,而 open gl 在 50-55fps 之间,并且随着更多 sprite 的存在,差距会变得更大.

im testing the android SpriteMethodTest and on default settings canvas is getting 58fps while open gl is between 50-55fps, and the gap just gets larger with more sprites.

我的印象是 opengl 比 canvas 快,所以这是错误的吗?还是他们的手机出了问题(htc 的愿望)?

I was under the impression that opengl is faster than canvas so is this wrong? or is their something wrong with my phone (htc desire)?

http://code.google.com/p/apps-for-android/source/browse/trunk/SpriteMethodTest/

推荐答案

应该注意的是,SpriteMethodTest 并未以最大效率使用 OpenGL.每个精灵都使用自己的一组 GL 调用进行渲染,理想情况下,应将许多精灵分批处理到尽可能少的 OpenGL 调用中.

It should be noted that SpriteMethodTest is not using OpenGL at maximum efficiency. Each sprite is being rendered with its own set of GL calls, where ideally many sprites should be batched into as few calls to OpenGL as possible.

在 JavaGaming 上发生了精灵渲染性能大战.org 现在,libGDX 是当前的领跑者.如果处理得当,OpenGL 是绘制内容的最快方式.

THere's a sprite-rendering performance shootout happening over at JavaGaming.org right now, and libGDX is the current frontrunner. When handled correctly, OpenGL is the fastest way to draw stuff.

这篇关于android open gl真的比canvas慢吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆