Hey Guys,
I didnt code in like forever and want to start Again.
Now i did read some stuff about Sprites vs Sprite Sheets /Texture Regions and im kinda confussed.
Like in the Past, ive Mostly used Libgdx for my 2d games. But I want to start with lwjgl this time.
Mostly i did draw my Sprites like that :
public void create () {
batch = new SpriteBatch();
Sprite player = new Sprite(xyz); //texture and so on
}
public void render () {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); // This cryptic line clears the screen.
batch.begin();
// Drawing sprite her e.g. player.draw(batch);
batch.end();
}
Now in the lwjgl git ive found this :
from what i understand in Libgdx i basicly did it like this :
[quote]This is the basic idea behind a sprite batcher. As you can see, using many textures will lead to many draw calls (as the batch will need to flush for each new texture). This is why a texture atlas (AKA sprite sheet) is always recommended; it allows us to render many sprites in a single draw call.
[/quote]
Is that the Case ? And if yes, if i really do start working with Texture Sheets, like the following code, i dont see how its gonna increase the Performance, since it looks nearly the same for me :
... inside SpriteBatch begin / end ...
spriteBatch.draw(region, x, y);
what i mean is, if i do it like this, in the end i also will have many many “spriteBatch.draw(region, x, y);” calls which is like the same.
Thanks in advance Guys,
If i did write crap please bear with me, my coding is reallllyyyy rusty.