Question!
Is there any way of changing a vertex buffer, like the position, in the c++ code file(not in the .fx), after being created.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement