Mark Flamer

When I overwrite a portion of a static VertexBuffer can I overwrite just a portion in the middle of the buffer or do I have to overwrite from the starting point all the way to the end of the buffer

Re: XNA Framework VertexBuffer.SetData

Duckocide

Looking at the documentation. SetData is overloaded with parameters to allow an offset when setting the buffer. I haven't tried it myself - Run a few experiments. You'll soon find out the issues.

ms-help://MS.VSExpressCC.v80/MS.VSIPCC.v80/MS.XNAFX.1033/XNA/SetData_VertexBuffer_Graphics_Framework_Xna_Microsoft_M_O.htm

VertexBuffer.SetData (Int32, T[], Int32, Int32, Int32, SetDataOptions) Sets the vertex buffer data, specifying the start index, staring offset, number of elements, and size of the vertex buffer elements.

 






Re: XNA Framework VertexBuffer.SetData

Mark Flamer

Thanks for the reply. I have already read the documentation and have been overwriting parts of buffers. But I thought I read someware that it's most efficent to overwrite from your starting offset all the way to the end of the buffer, insted of starting and stopping. It was late when I posted last night, I probably diddn't make it very clear.