This is just a really quick post wondering what i have done wrong?
I want the background to be filled on the whole screen with whatever screen sizes i have but this does not make it work. Here is all the code:
// Variables
Jump game;
OrthographicCamera cam;
SpriteBatch sb;
// Variables
public SplashScreen(Jump game)
{
this.game = game;
cam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
cam.translate(cam.viewportWidth / 2, cam.viewportHeight / 2);
sb = new SpriteBatch();
}
public void show()
{
}
public void render(float delta)
{
Gdx.gl20.glClearColor(0.2F, 0.6F, 1F, 1F);
Gdx.gl20.glClear(GL20.GL_COLOR_BUFFER_BIT);
cam.update();
sb.begin();
sb.setProjectionMatrix(cam.combined);
sb.draw(Assets.splash_spr_background, 0, 0);
sb.end();
}
Thanks! :)