Jump to content
  • Advertisement
Sign in to follow this  

[basic 2d] Vertex buffer, batching and atlas

This topic is 2221 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone smile.png
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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!