XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

Best practice for DynamicVertexBuffer update

Last post 05-03-2008 10:34 AM by Lustild. 2 replies.
  • 05-01-2008 6:37 AM

    Best practice for DynamicVertexBuffer update

    Hi all,

    I need to use the DynamicVertexBuffer class to be able to edit a mesh on-the-fly in my application (a simple 3D modeler). But as the user rarely acts on the whole mesh at once, only subparts of the buffer needs to be updated after an operation. So I came across the following question: as the DynamicVertexBuffer class has multiple SetData prototypes, is it better to call it several times for each subpart of the buffer that changed after an operation, or call it once to fully update the buffer?
  • 05-01-2008 7:49 AM In reply to

    Re: Best practice for DynamicVertexBuffer update

    Answer

    Probably multiple times.

    But having said that, I think in your case it doesn't matter.  Since your not creating a game with lots of competing assets, doing the SetData once would be fine.

  • 05-03-2008 10:34 AM In reply to

    Re: Best practice for DynamicVertexBuffer update

    I'll stick with one massive update then, as it saves me some coding time :D.

    Thanks !
Page 1 of 1 (3 items) Previous Next