Question!

Started by
4 comments, last by lomateron 12 years, 1 month ago
Is there any way of changing a vertex buffer, like the position, in the c++ code file(not in the .fx), after being created.
Advertisement
Depends on the flags you passed when creating the vertex buffer.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

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.
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?
ok now i know i found the explanation in the Franks D. Luna book

This topic is closed to new replies.

Advertisement