Original Post
So, I've done a lot of network programming but decided to expand my graphic programming knowledge. I've run into an issue that none of the books I have really explain well. When you lock the vertex buffer, it takes in a double void pointer as the source of your vertices. This double void pointer has no size and I see people just memcpy'ing random amounts of data into this unknown sized pointer. So, A. Wouldn't copying data into an unknown-sized, double void pointer buffer cause a crash? Why does this seem to work in sample programs? Is the data being written to already allocated blocks of memory that DirectX just manages? B. Is it better to create a contiguous block of memory with all your vertices per a given context, then locking the buffer and pointing it to the already populated vertice list, the drawing? C. What is the basic flow for using vertex buffers to draw various geometry with various textures? Sorry for the rather noobish questions and thanks for your help. :)