问题描述
我试图开发在Android上使用OpenGL应用程序,最好让任何手机上运行一样古老原始的机器人(或至少是任何拥有OpenGL ES 2.0的支持电话)。目前,我使用的是2048 * 2048 ETC1纹理COM pression。它工作正常的Droid X的,我测试它,但我目前还没有一个原始的机器人来测试它,而且我也不能找到关于此主题的多的数据。我知道G1不与纹理比512x512的大做的很好,和机器人似乎与图像作为大做精为1024x1024的,但对于2048×2048? (同样,ETC1 COM pression,所以它的约2 MB大)。同时,由于ETC1不支持Alpha,我想加载另一个ETC1纹理支持Alpha通道。这是一个白日梦?
I'm trying to develop an app that uses opengl on android, and ideally make it run on any phone as old as the original droid (or at least any phone that has OpenGL ES 2.0 support). Currently, I'm using a 2048x2048 ETC1 texture compression. It works fine on the Droid X I'm testing it on, but I currently don't have an original droid to test it on, and I can't find much data on this topic either. I know the G1 didn't do well with textures bigger than 512x512, and the droid seems to do fine with images as large as 1024x1024, but what about 2048x2048? (Again, etc1 compression, so it's about 2 MB large). Also, because ETC1 doesn't support alpha, I would like to load up another ETC1 texture to support an alpha channel. Is this a pipe dream?
基本上,我想知道我有多大的空间来装载Android手机的纹理数据并不比原来的机器人年纪大了,至少在没有整件事放缓急剧下降。
Basically, I would like to know how much space I have to load texture data in android phones no older than the original droid, at least without the whole thing slowing down drastically.
推荐答案
您可以查询MAX_TEXTURE_SIZE得到最大纹理大小,或者你可以看看您的手机上的(你可以找到在Droid信息<一个href=\"http://glbenchmark.com/phonedetails.jsp?benchmark=glpro20&D=Motorola+Droid+%28Milestone+Sholes%29&testgroup=gl\"相对=nofollow>这里)。在G1不支持GLES 2.0,AFAIK。
You can query the MAX_TEXTURE_SIZE to get the maximum texture size, or you can look up your phone on http://glbenchmark.com (you can find the Droid info here). The G1 did not support GLES 2.0, AFAIK.
加载了几个纹理应definitly工作,尤其是当他们每次不超过2 MB。但你会当然受可用存储器的大小被限制。
Loading up several textures should definitly work, especially when they are not more than 2 MB each. But you will of course be restricted by the size of the memory available.
此外,有你应该MIPMAP的纹理最佳性能。由于您使用的ETC,这个必须脱机完成。
Also, to have optimal performance you should mipmap your textures. Since you are using ETC, this must be done offline.
有关指导如何使用ETC1与α,看到的。
For a guide to how to use ETC1 with alpha, see here.
这篇关于合理的纹理尺寸在android系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!