Jump to content

  • Log In with Google      Sign In   
  • Create Account


[basic 2d] Vertex buffer, batching and atlas


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Namyr   Members   -  Reputation: 110

Like
0Likes
Like

Posted 15 September 2012 - 11:07 PM

Hello everyone Posted Image
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!

Sponsor:

#2 Namyr   Members   -  Reputation: 110

Like
0Likes
Like

Posted 17 September 2012 - 12:03 AM

Never mind, I believe I figured it out.
Thanks.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS