Android 设备 GL_MAX_TEXTURE_SIZE 限制,安全纹理大小 [英] Android devices GL_MAX_TEXTURE_SIZE limitation, safe texture size

查看:19
本文介绍了Android 设备 GL_MAX_TEXTURE_SIZE 限制,安全纹理大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 AndEngine 和 OpenGL ES 2.0.我一直在阅读有关 GL_MAX_TEXTURE_SIZE 以及如何将纹理保持在 1024x1024 下的内容.我之前和在 TMX 扩展中使用图块集时开始出错(如果你不知道 AndEngine,它是什么并不重要)我得到了一个图块集,它使纹理比 1024px 更宽.我正在考虑将图块集分成两部分,使它们安全".但我找不到在过去几年发布的任何设备在 2048x2048 下设置了此限制.是否有任何列表或网站可以用来按 GL_MAX_TEXTURE_SIZE 过滤设备?

I am working with AndEngine and OpenGL ES 2.0. I keep reading about GL_MAX_TEXTURE_SIZE and how I should keep my texures under 1024x1024. I started wrong before and while using tilesets in TMX extension (doesn't really matter what it is, if you don't know AndEngine) I get to a tileset that makes a texture wider than 1024px. I am thinking of splitting the tileset into two, making them "safe". But I can't find any device released in last couple of years that has this limit set under 2048x2048. Is there any list or website I can use to filter devices by GL_MAX_TEXTURE_SIZE?

我阅读了以下问题:

我用这个网站搜索设备.但我不能按 GL_MAX_TEXTURE_SIZE 搜索/过滤,这使搜索变得乏味.我问主要是因为我开始错了,这是一个爱好项目,与可能启用的设备数量相比,工作量可能太大(我希望 0).

And I used this site to search for devices. But I can't search by/filter by GL_MAX_TEXTURE_SIZE, which makes the search tedious. I am asking mostly because I started wrong, it's a hobby project and the amount of work might be too large compared to the number of possible devices that will be enabled (I expect 0).

推荐答案

1024x1024 几乎是您可以在任何设备上使用的最安全的分辨率,尤其是在旧设备上.较新的设备应该没有任何问题,尽管我已经看到最近的设备(我记得 Galaxy Nexus,不过最新的 ICS 更新已修复)渲染白色四边形,纹理大小为 2048x1024.

1024x1024 is about the safest you can go on any device, especially on older ones. Newer devices shouldn't have any problem, although I've seen recent devices (I recall a Galaxy Nexus, the newest ICS update fixed that though) render white quads with texture sizes of size 2048x1024.

如果您的目标是新设备并希望保持旧设备兼容,那么拆分您的图块集应该不会有什么坏处.毕竟,如果您使用两个或三个精灵表作为背景等,您不太可能进行太多的上下文切换.

If you're targeting new devices and want to keep older ones compatible, it shouldn't hurt to split your tilesets. After all, you aren't likely to do too many context switches if you use two or three spritesheets for background, etc.

这篇关于Android 设备 GL_MAX_TEXTURE_SIZE 限制,安全纹理大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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