デバイスに大きな背景画像をロードする問題(Andengine)
質問
デバイスにロードするとき、白い画像ディスプレイのみを表示し、エミュレータをロードすると、画像が壊れます
サンプルコード:
// this.mcamera = new Camera(0、0、480,320);
final Engine engine = new Engine(new EngineOptions(true,
screenorientation.landscape、new fellSolutionPolicy()、this.mcamera));
this.mcamera = new Camera(0、0、camera_width、camera_height);
final Engine engine = new Engine(new EngineOptions(true,
screenorientation.landscape、new fellSolutionPolicy()、this.mcamera));
//----
this.mtexture = new Texture(2048、512、TextureOptions.bilinear_premultiplyalpha); this.mbgtexturegion = texturegionfactory.createfromasset(this.mtexture、this、 "gfx/bg.png"、0、0);
this.mEngine.getTextureManager().loadTexture(this.mTexture);
Andengineで使用する最大テクスチャサイズは何ですか。私は2048を使用しました、それは問題、plzヘルプ?
解決
最大テクスチャサイズはデバイスによって異なります。新しいデバイスのみが2048x2048をサポートしています。私の経験では、1024x1024は今日の時点でよりよくサポートされています。
実行時に最大サイズを見つけることも可能です:さまざまな電話の最大テクスチャサイズを見つけるにはどうすればよいですか?
所属していません StackOverflow