Jump to content
  • Advertisement
Sign in to follow this  
lomateron

Question!

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

Is there any way of changing a vertex buffer, like the position, in the c++ code file(not in the .fx), after being created.

Share this post


Link to post
Share on other sites
Advertisement
Ok, itis D3D10_USAGE_DYNAMIC, now how is the code to change it, the vertex buffer only has one vertice and it only is position, no more that that.

Share this post


Link to post
Share on other sites
Call Map on the ID3D10Buffer, and pass D3D10_MAP_WRITE_DISCARD. You can then use the pointer you get from the ppData parameter to fill in the vertex data. Call Unmap when you're done, and it's ready to use.

Share this post


Link to post
Share on other sites
What?! /(*-*)/
Got this
ID3D10Buffer* g_pVertexBuffer = NULL;
Now pass this as flag in the description? D3D10_MAP_WRITE_DISCARD?
the ppData parameter?What?! Where is that?
Call Unmap?
:(
Can you show me the code?

Share this post


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

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!