Sign in to follow this  

[basic 2d] Vertex buffer, batching and atlas

Recommended Posts

Hello everyone [img][/img]
I'm a very beginner in dx programming, I'm working on a basic 2d graphics engine (D3D11). I was reading some books, articles, tutorials and I managed to setup the basic, I can draw a sprite, move it around scale etc.
Now I need to go deeper and I need to render multiple sprites, multiple textures etc.
I have one vertex buffer and one texture for my demo sprite, I read and I have been told that the best way to handle 2d is using sprite batching and texture atlas.
I did some researches but I honestly couldn't figure this out.
How does batching work exactly? I know that texture atlas is basically multiple images on one big texture but how do I relate this with vertices? Do I have to create a huge vertex buffer that can hold something like 100 quads and every frame move these quads around and remap their texture and call one single draw call for this huge buffer? Or do I only need one big quad? How does it work exactly?
What are the exact steps I should perform each frame?

Thank you for your time and for your help!

Note: I posted here and not on the graphics forum because I believe my question is a pretty beginner one!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this