Sign in to follow this  
Etherstar

Combining Vertex Buffers?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this