我有一个游戏可以在两个设备(nexus 4& 7)和模拟器中正确显示对象,但在第三个设备上显示白色(samsung sgh-t679m)。
请注意,在" old"三星,背景图像和道路图像都是正确的颜色,但房屋,飞机等都是白色的。我无法找到类似的问题。其他问题在所有设备上始终报告白色对象。否则,游戏操作正在运行。三星有android 2.3.5
代码的主要部分如下:
public void render(World world, float deltaTime) {
GL10 gl = glGraphics.getGL();
if (world.bob.runningState == Bob.BOB_FALLING) {
camera.getPosition().set(0, 2f, GameScreen.cameraZ + 2);
camera.getLookAt().set(0, 0, GameScreen.cameraZ - 4);
}
else {
camera.getPosition().set(0, 5f, GameScreen.cameraZ + 2);
camera.getLookAt().set(0, 0, GameScreen.cameraZ - 4);
}
camera.setMatrices(gl);
gl.glEnable(GL10.GL_DEPTH_TEST);
gl.glEnable(GL10.GL_TEXTURE_2D);
gl.glEnable(GL10.GL_LIGHTING);
gl.glEnable(GL10.GL_COLOR_MATERIAL);
ambientLight.enable(gl);
directionalLight.enable(gl, GL10.GL_LIGHT0);
renderBackgroundImages(gl, world.backgroundimages, deltaTime);
renderRoads(gl, world.roads, deltaTime);
renderCoins(gl, world.coins, deltaTime);
renderObstacles(gl, world.obstacles, deltaTime);
renderOverheads(gl, world.overheads, deltaTime);
renderHouses(gl, world.houses, deltaTime);
renderBob(gl, world.bob, deltaTime);
renderInvaders(gl, world.invaders, deltaTime);
renderShots(gl, world.shots, deltaTime);
gl.glDisable(GL10.GL_TEXTURE_2D);
gl.glDisable(GL10.GL_COLOR_MATERIAL);
gl.glDisable(GL10.GL_LIGHTING);
gl.glDisable(GL10.GL_DEPTH_TEST);
}