在设备中仅加载白色图像显示时,加载模拟器时图像会被破坏
示例代码:
// this.mCamera = new Camera(0,0,480,320);
final Engine engine = new Engine(new EngineOptions(true,
ScreenOrientation.LANDSCAPE,new FillResolutionPolicy(),this.mCamera));
this.mCamera = new Camera(0,0,CAMERA_WIDTH,CAMERA_HEIGHT);
final Engine engine = new Engine(new EngineOptions(true,
ScreenOrientation.LANDSCAPE,new FillResolutionPolicy(),this.mCamera));
// ----
this.mTexture = new Texture(2048,512,TextureOptions.BILINEAR_PREMULTIPLYALPHA); this.mbgTextureRegion = TextureRegionFactory.createFromAsset(this.mTexture,this,“gfx / bg.png”,0,0);
this.mEngine.getTextureManager().loadTexture(this.mTexture);
最大纹理大小将在andengine中使用。我使用2048,它的制造问题,Plz帮助?
答案 0 :(得分:1)
最大纹理大小取决于设备。 只有较新的设备支持2048x2048。根据我的经验,1024x1024在今天得到了更好的支持。
也可以在运行时找到最大尺寸: How can I find the maximum texture size for different phones?