Archived

This topic is now archived and is closed to further replies.

Vendayan

Using Vertex Buffers

Recommended Posts

Vendayan    278
I know how do display primitives with vertex buffers, but how do I actually get info into a buffer to begin with? And for that matter how do I get the info back out in order to send the data through the transformation changes and to do collision detection etc. ? Any help is appreciated ~Vendayan

Share this post


Link to post
Share on other sites
lunarss    169
You leave the data that you want drawn in the vertex buffer. There aren''t many cases in which you want to take data out because its very costly to do so. The transformations are applied to the vertex buffer internally by direct3d. All you have to do is specify which matrices to use. Off the top of my head I think the function is D3DSetMatrixTransform or something sorta close to that. Of course you have to fill in the matrices yourself, but you should know how to do that. Once you fill the vertex buffer, you still have your data externally, meaning, you dont get rid of it just because you put it in the vertex buffer, so just do collision detection and any other stuff on that.

Share this post


Link to post
Share on other sites