Original Post
im having troubles locking the vertex buffer, it keeps saying the call is invalid.
create buffer code:
pD3DDevice->CreateVertexBuffer(newTerrainChunk.numOfVertices * sizeof(TERRAIN_D3DFVF),
0, TERRAIN_D3DFVF,
D3DPOOL_DEFAULT, &newTerrainChunk.pVertexBuffer, 0)
code to lock:
void* pVertices; newTerrainChunk.pVertexBuffer->Lock(0, 0, (void**)&pVertices, D3DLOCK_DISCARD);