I'm using LibGDX and having an issue rendering Sprites, I've been working on it for 6hours now, and now I'm almost at the point where I want to rip my own hair out.
If I just draw the sprite, the sprite draws like so (the small green thingy: https://gyazo.com/6a70bb710fdd6bb9d372cef050cb6c4e
If I draw anything after that, lets say my rayHandler, the sprite doesn't draw: https://gyazo.com/432d7cbd19f55b6be7252537b14cd35b
Here is my render method:
@Override
public void render(float delta) {
/**
* Clear screen.
*/
Gdx.gl.glClearColor(0, 0, 0, 0);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
continuousInput(delta);
update(delta);
/**
* Start 'spriteBatch'.
*/
spriteBatch.begin();
spriteBatch.setProjectionMatrix(cameraHandler.orthographicCamera.combined);
spriteBatch.disableBlending();
/**
* Render our handlers
*/
spriteBatch.draw(texture, 100, 1);
//mapHandler.render(delta);
// lightHandler.render(delta);
// playerHandler.render(delta, spriteBatch);
spriteBatch.draw(texture, 100, 1);
spriteBatch.draw(texture, 1, 1);
/**
* End 'spriteBatch'.
*/
spriteBatch.end();
}
My project is rather big so I won't include any specific classes, but if you guys know this as a common problem then a solution would be extremely helpful. Here is the code for my entire project, it got messy at the end because I was extremely aggitated.
NOTE: The map and everything renders fine, I think it's an issue with the spriteBatch but I can't figure it out.
SOURCE: http://www.filedropper.com/resident
Once again, thank you! Any response is appreciated. - Jake