Locking the Vertex Buffer

ThePentiumGuy

Well-known member
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
 
Dont worry too much. Thats just how it is in c world. Everything there is by value, you have no reference types. So in this case its the equivalent of passing an array byref. They have to cast to void since thats the declaration of the function and its an upward cast and that must be explicit in c.
 
Back
Top