quote:Original post by Stevieboy
my question is what does (void**)&v mean, (void**) is a cast, so you are casting &v to a pointer to a pointer, I don't want to try and get thinhgs confused but that's is what it seems to me.
Yes you are casting &v to a pointer to a pointer (to untyped data).
So clearly v should also be a pointer (usually to the data type you want and know it to be, your vertex type).
Now if you happened to have defined v as void* &v is already a void**, so the cast is redundant.
Typically you want v to be a more usefull type, like your vertex type so you can do the cast just once when getting the data, rather than each time you try to use it.
so it would be:
MyVertex* pvbdata; // somehow I know that _vb is of type MyVertex. Maybe I checked the vertex buffer desc structure, maybe some other way
_vb->Lock(0, 0, (void**)&pvbdata, 0);
Edit: heh ok, well I answered twice already
[edited by - JeffF on March 11, 2004 1:36:44 PM]