How to read vertices from vertex buffer in Direct3d11
问题 I have a question regarding vertex buffers. How does one read the vertices from the vertex buffer in D3D11? I want to get a particular vertex's position for calculations, if this approach is wrong, how would one do it? The following code does not (obviously) work. VERTEX* vert; D3D11_MAPPED_SUBRESOURCE ms; devcon->Map(pVBufferSphere, NULL, D3D11_MAP_READ, NULL, &ms); vert = (VERTEX*) ms.pData; devcon->Unmap(pVBufferSphere, NULL); Thanks. 回答1: Where your code is wrong: You asking GPU to give