简体   繁体   English

Android Studio Libgdx黑色纹理

[英]Android Studio Libgdx Black Texture

I put a texture as a background with 720 width and 8140 height and I am drawing it as a background without stretching it. 我将纹理作为具有720宽度和8140高度的背景,并在不拉伸的情况下将其绘制为背景。 It appears black, but on another phone it was fine. 它显示为黑色,但在其他手机上也可以。 Other textures are fine. 其他纹理也不错。 What is the problem? 问题是什么?

Many GPUs simply cannot load a texture with a width or height greater than 2048. You can query the max size supported at runtime, but that would only be useful if you have a backup plan for devices that cannot support the size you want. 许多GPU根本无法加载宽度或高度大于2048的纹理。您可以查询运行时支持的最大大小 ,但这仅在您有针对不支持所需大小的设备的备份计划时才有用。 I think it would be easier to have one design based on the 2048 limit. 我认为基于2048个限制进行设计会更容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM