I´m doing a mario bross game and I have problems i think with the rendering. I attached some photos to explain better the issue. I don´t have any idea why this happen.
Vertical stripes appear sometimes.
Thanks in advance.
@Override
public void render(float delta) {
update(delta);
Gdx.gl.glClearColor(0, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
renderer.render();
b2dr.render(world, gamecam.combined);
game.batch.setProjectionMatrix(gamecam.combined);
game.batch.begin();
player.draw(game.batch);
for (Enemigo enemigo:creator.getEnemies()) {
enemigo.draw(game.batch);
}
for(Item item : items){
item.draw(game.batch);
}
for (Plataforma plataforma : creator.getPlataformas()){
plataforma.draw(game.batch);
}
game.batch.end();
game.batch.setProjectionMatrix(hud.stage.getCamera().combined);
hud.stage.draw();
if(gameOver()){
game.setScreen(new GameOverScreen(game));
dispose();
}
}