Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4117380
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:49:40+00:00 2026-05-20T22:49:40+00:00

For a little background: I am working on a project in C++ in which

  • 0

For a little background: I am working on a project in C++ in which I am trying to draw 3D representations of objects based on real time profile data. The profiling data is gathered from external profiling hardware. The system travels along an object and at a rate of 300 times per second provides my software with a profile slice. Each slice consists of a list of ~8000 X-Y points. The movement of the profiler is recorded by an encoder. The encoder information provides the 3rd dimension of the scan.

Another important thing to note is that the profiler may move back and forth over the object. As this happens, I want to replace previously read/drawn slices with new ones (based on encoder position). As of now, I am achieving this with a circular buffer of slices that I store by the encoder count. This also means that I will want to throw out slices as the buffer fills and begins overwriting old slices. In order to show the proper amount of the subject piece on the screen – I need to draw 1000 slices of profile data at a time. For now I am rendering the object as a point cloud. In the future we may attempt to attach adjacent slices and render as a triangle list.

I am new to DirectX, but using books and online examples I’ve gotten to the point where I am drawing the object in 3D, but I am convinced that I am not efficiently/properly using Vertex Buffers. Most examples I’ve found work with very static models. Therefore, they tend to create a single Vertex Buffer with their list of points, and then are just manipulated by matrix transformations. I, on the other hand, will be updating the scene very quickly as I retrieve profile data from our hardware.

Currently I am creating a new Vertex Buffer for each slice I read in. When I draw the scene I loop through my list of up to 1000 buffers and call Draw() for each one. I noticed that if I cut in half the number of Vertex Buffers drawn at a time, my FPS increased significantly, whereas there was little improvement when halving the number of Vertex Points per buffer – so I take that as an indication that the multiple Vertex Buffers is not the proper way to approach this.

So to the guts of my question… I’m wondering if I can put all these vertices in a single Vertex Buffer when the Vertices change so frequently. Can I update the points within an existing Vertex Buffer? Or should I just recreate a single brand new Buffer each time I update the scene? One last thing to keep in mind is that the number of points per slice from the hardware will vary – so when it comes to over-writing previous slices, the new slice may have more or fewer points than the slice being replaced.

Thanks for your time. Any advice will be much appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:49:41+00:00Added an answer on May 20, 2026 at 10:49 pm

    You can always update the points within a vertex buffer as long as you make the buffer dynamic (specify D3D10_USAGE_DYNAMIC and use ID3D10Device::CopySubresourceRegion to update only parts of the buffer efficiently). That should be more efficient than re-creating buffers too frequently.

    Having different sizes for each slice is bad, however. You could either implement some kind of memory manager to keep the overall fragmentation of your vertex buffers low or this is the point where using multiple vb’s is unavoidable. One way would be to round all slices sizes up to a reasonable limit and have one vb for each size.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A little background, because this might be kind of confusing: the project I'm working
A little background: I'm working on a project converting a webapp in another scripting
A little background: I am loading a WPF UI from a database which is
For a little background, I work for a firm that develops web-based enterprise social
First, a little background: I'm displaying a data set with 288 rows and 8
Just a little background on my project: I'm implementing an SMS encryption program using
Background I'm working on an application which requires user-entered content, and I've decided to
Hy guys! I am currently working on a little WPF project using MVVM via
i'm working on a little iOS project, and i stumbled across a problem with
A little background: I am working on a sliding block puzzle for a school

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.