Jump to content
  • Advertisement
Sign in to follow this  
Etherstar

Combining Vertex Buffers?

This topic is 4736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!