仅在设备中加载白色图像显示时,加载仿真器时,图像损坏了

示例代码:

// this.mcamera =新相机(0,0,480,320);

    final Engine engine = new Engine(new EngineOptions(true, 

ScreenItientation.landscape,new FillResolutionPolicy(),this.mcamera);

this.mcamera =新相机(0,0,camera_width,camera_height);

    final Engine engine = new Engine(new EngineOptions(true, 

ScreenItientation.landscape,new FillResolutionPolicy(),this.mcamera);

//----

this.mtexture =新纹理(2048,512,textureoptions.bilinear_premultiplyalpha); this.mbgtextureregion = textureregionfactory.CreateFromasset(this.mtexture,this,“ gfx/bg.png”,0,0,0);

        this.mEngine.getTextureManager().loadTexture(this.mTexture);

最大纹理大小将在AND GENTINE中使用。我使用了2048年,它的问题,请帮助吗?

有帮助吗?

解决方案

最大纹理大小取决于设备。只有较新的设备支持2048x2048。根据我的经验,截至今天,1024x1024得到了更好的支持。

也可以在运行时找到最大尺寸:如何找到不同手机的最大纹理大小?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top