Jump to content
  • Advertisement

Archived

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

DavidClarke

Vertex Buffers and Dynamic Arrays

This topic is 5455 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

The number of vertices used in my program needs to vary when running i.e. I want to store vertices data dynamically and display them to the screen. I want to use a dynamic array to store the vertex data. However, I meet a brick wall when trying to copy my vertex data to the vertex buffer. From the examples I''ve seen on the net, Direct3D wants a static array i.e an array with a fixed size. Is there any way in which I can copy my size varying vertex data across to the vertex buffer when rendering?

Share this post


Link to post
Share on other sites
Advertisement
Do not make an absurdly large vertex buffer like 20 megabytes. Instead make a smaller one and fill it as needed. When it is full, render, then relock and continue filling.

Share this post


Link to post
Share on other sites

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