Archived

This topic is now archived and is closed to further replies.

johnnyBravo

Using both dynamic vertex buffer and indexed buffer together..fast enough?

Recommended Posts

johnnyBravo    100
Hi, im doing a topish view strategy game thinking of only drawing the vertices that are on screen, very similar to drawing tiles in 2D. So far i can''t think of any ''decent'' way of storing all data in vertex buffer and being able to check if the points are within screen. so i thought i was use a two dimensional array to store the map, then put the points that are on screen into the vertex buffer, then assign the triangles with an indexed buffer to draw. this would require filling both the vertex buffer and index buffer every loop. But im wondering if this would give me a performance loss. thanks,

Share this post


Link to post
Share on other sites
tok_junior    229
Keep a static vertexbuffer with all the vertices, and just update the indexbuffer to contain the stuff that needs to be drawn.


--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.

Share this post


Link to post
Share on other sites
johnnyBravo    100
actually since im just making a tile style landscape, i could just put index numbers in two dimensional arrays pointing towards which vertices to use,

Share this post


Link to post
Share on other sites