我可以用于 android 设备的最大精灵表大小是多少? [英] What is the maximum sprite sheet size I can use for android devices?

查看:9
本文介绍了我可以用于 android 设备的最大精灵表大小是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在安卓设备上使用的最大精灵表尺寸是多少?听说有限制,因为有些设备不能处理大图.8196x4092px 还可以吗?

What is the maximum sprite sheet size I can use for android devices? I heard that there is a limit, because some devices can't handle large images. Is 8196x4092px still okay?

推荐答案

我觉得8196x4092px的纹理分辨率太大了,你应该尝试降低spritesheet的分辨率,或者把你的spritesheet 分成不同的 spritesheets 然后组装它们

I think a texture resolution of 8196x4092px is too big, you should try to reduce the resolution of the spritesheet, or dividing your spritesheet into diferent spritesheets then assembling them

因为 8196x4092px 可能会导致您在某些设备上出现问题

cause 8196x4092px may cause you problem on some devices

最大纹理尺寸

您可以通过以下方式查询最大纹理宽度和高度:

You can query the maximum texture width and height with the following:

IntBuffer buf = BufferUtils.newIntBuffer(16);
Gdx.gl.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, buf);
int maxSize = buf.get(0);

通常,大多数现代计算机至少允许 4096x4096 纹理,但如果您想真正安全,可以将自己限制为 2048x2048.如果您的目标是 Android、iOS、WebGL 或其他 OpenGL ES 设备,那么坚持使用 1024x1024 或更小可能会更安全,除非您完全确定您的目标受众.

Generally, most modern computers allow for at least 4096x4096 textures, but if you want to be really safe, you can limit yourself to 2048x2048. If you are targeting Android, iOS, WebGL, or another OpenGL ES device, you might be safer sticking with 1024x1024 or less, unless you are absolutely sure of your target audience.

来自 Libgdx wiki,更多信息请参见:https://github.com/mattdesl/lwjgl-basics/wiki/LibGDX-Textures

from Libgdx wiki, for more please see : https://github.com/mattdesl/lwjgl-basics/wiki/LibGDX-Textures

祝你好运

这篇关于我可以用于 android 设备的最大精灵表大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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