Problem to load large background image in device (Andengine)
When loading in device only white image display,When loading emulator the images are broken
sample Code:
// 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.LANDSCAP开发者_如何学GoE, 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);
whats maximum Texture size will use in andengine. I used 2048 , its make problem, Plz help ?
The maximum texture size depends on the device. Only newer devices support 2048x2048. In my experience 1024x1024 are better supported as of today.
It is also possible to find max size at runtime: How can I find the maximum texture size for different phones?
精彩评论