在 OPENGL 2.0 Android 中使用非常大的位图纹理
我有一个使用 OPENGLES2.0 查看可缩放图像的应用程序,并且想要渲染大纹理 - 1920x2560 和更大 - 并在尝试加载它们时出现 GL_INVALID_VALUE 错误。
我该怎么做呢?
I have an application which views zoomable images using OPENGLES2.0, and want to render large textures - 1920x2560 and larger - and get GL_INVALID_VALUE errors when trying to load them.
How do I go about doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
移动设备通常无法支持大于 2048 像素(宽度或高度)的纹理。
例如,IPAD 等 IOS 设备无法支持大于 2048x2048 的纹理。
我在测试 PATRIA 3D 引擎的大多数 Android 设备上发现了相同的限制,因此我只能建议您保持在这个限制以下。
我建议你仔细阅读这个OpenGL官方文档
http://www.opengl.org/resources/faq/technical/texture.htm
特别指出:
21.130 我的设备将渲染硬件加速的纹理贴图的最大尺寸是多少?
Mobile devices often cannot support textures bigger than 2048 pixels (width or height).
IOS devices such as IPAD for instance cannot support textures bigger than 2048x2048.
I have found the same limit on most of the Android devices where I have tested my PATRIA 3D engine hence I can only advice you to stay under this limit.
I suggest you to read carefully this official OpenGL document
http://www.opengl.org/resources/faq/technical/texture.htm
In particular point:
21.130 What's the maximum size texture map my device will render hardware accelerated?