Original Post
I have a program that renders up to several hundred sprites each frame across six different layers (with each layer representing a texture and corresponding vertex buffer). In my prototype, I was rendering each sprite with a separate DrawPrimitive call; very slow, but it got the job done. Now I need to optimize using vertex buffers.
The largest number of sprites in a given vertex buffer will probably be about 1248 (absolute maximum). My sprites are being created an destroyed almost constantly. Do you think it''s reasonable to construct a fresh vertex buffer each frame (32ms = 0.03125s), or would you recommend updating my existing vertex buffers, rebuilding them only when sprites are added/removed? I wonder what kind of overhead there is for uploading new buffers to the video card every frame; that''s why I ask.
I like to hear from someone with experience and advice in this sort of thing. Thanks in advance.