Jump to content
  • Advertisement
Sign in to follow this  
Downie

[Directx 10] Quick Question About VB's Please!!!

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

Hi. I was wondering if it is possible to map vertex data from a list to a vertex buffer, maybe something like this
	//Lock the buffer 
	mVB->Map(D3D10_MAP_WRITE_NO_OVERWRITE, 0, reinterpret_cast<void**>(&pVert));

	//Copy the vertex data into the buffer
	for(int i=0; i<ListSize; i++) 
		*pVert++ = *mllVertexList.GetByIndex(i);

	//Unlock the buffer
	mVB->Unmap();
Or is it only possible with contiguous storage like arrays? I know arrays are better for this as I could use update subresource or memcpy to update quicker. But my vertex data is dynamic and using a list allows me to track which vertices have been changed and only update them. Thanks [Edited by - Downie on April 30, 2009 2:33:24 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!