Locking the Vertex Buffer

ThePentiumGuy

Senior Contributor
Joined
May 21, 2003
Messages
1,113
Location
Boston, Massachusetts
hey,
in Unmanaged C++ when you try to lock the Vertex buffer you need to do something like this (off the top of my head)

VB->Lock(0, (void**)&vertices,0)

err.. i dont remmeber exactly, but i remember that the (void**)&vertices argument is there somewehre

i know the parenthesees specifies like a CType
for example

int x;

x = (float) 1 / (float) 2

*i think* lol

but why is void a pointer to a pointer and why would you want vertices to be converted to the void type?,

pent
 
Don't worry too much. That's just how it is in c world. Everything there is by value, you have no reference types. So in this case it's the equivalent of passing an array byref. They have to cast to void since that's the declaration of the function and it's an upward cast and that must be explicit in c.
 
Back
Top