Skip to main content
GameDev.net gamedev.net
🔒 Locked

Combining Vertex Buffers?

Started by Etherstar Aug 30, 2005 at 11:57 AM 3 replies 2.1k views
Original Post
Etherstar
Etherstar
Is it possible to combine vertex buffers after they've been created? Here is my current situation: I have a quad which contains 2 triangles with 6 vertices. I want to tile this quad over a large area of 10x10 tiles. Instead of calling drawprimitives() 100 times, I am wondering if there's and easier way to combine all the tiles into a single vertex buffer so I only call drawprimitive() once. Suggestions? Thoughts? Spam?
dave
dave
No, You would have create a big one and memcpy them all in manually.

I wrote a wrapper for a Vertex Buffer that took care of this operation for you.

ace
dave
dave
Just thought of something, one thing you could do is transfrom your vertices and bundle them into a vector. You can add vectors together and memcpy accross from it to the vertex buffer.

ace
Etherstar
Etherstar
I'm using C# so I'll probably just manually transform them and then load them into a giant array before I create the Vertex Buffer. Fun times ahead for sure!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.