【发布时间】:2011-10-03 17:34:46
【问题描述】:
问题:使用 Andengine(包装 opengl)编写的 android 应用程序中的纹理质量很差,尤其是在以几种颜色显示为阶梯的渐变上。问题出现在真实和虚拟设备上
设置:默认纹理、全屏、原生分辨率、android 2.2。 我试图通过以下方式强制执行 PixelFromat:
public void onAttachedToWindow() {
super.onAttachedToWindow();
Window window = getWindow();
window.setFormat(PixelFormat.RGBA_8888);
}
没有任何区别。
评论行:
GLHelper.disableDither(pGL); 对纹理有所帮助,但让粒子看起来很糟糕,所以猜测它不是问题的根源。
加载代码示例:
public static void loadResources(StreamgameActivity game) {
magnetTexture = new BitmapTextureAtlas(512, 512, TextureOptions.BILINEAR);
magnetTextureRegion = BitmapTextureAtlasTextureRegionFactory
.createFromAsset(magnetTexture, game,"bateria128CMatte_none.png", 0, 0);
game.getEngine().getTextureManager().loadTexture(magnetTexture);
}
【问题讨论】:
标签: android textures andengine