| Aderic (6) | |||||
|
Hey guys, I have a question on DirectX. I've read multiple guides and.. well I'm not quite the fastest learner but anyhow I can't seem to get a direct answer as to how I would go about setting up a dynamic vertex buffer. I'm designing a 2D platform game, each tile is 2 triangles or 6 vertices. If players were to spawn, that would cause the amount of vertices on-screen to increase by another 6. The dilemma I'm running into is more of a design issue. Where am I to store these new vertices? Also, is it a good idea to house all of the vertices in a giant array and feed it in the vertex buffer once or to seperate vertex buffers every X amount of vertices? My current code:
My actual drawing code:
Edit: Should mention, this is DirectX 9 code. Reason I decided not to go with DirectX 10 or 11 was because it's a 2D platform and not everyone has DX10 or DX11 cards. Any help would be greatly appreciated. :) Mark. | |||||
|
Last edited on
|
|||||