I was wondering, is it possible to place index data directly into a Map Resouce without using memcpy?
I'm working on a sprite batcher and right now I use memcpy to place the vertex data from my Quad struct into the vertex Map Resouce. But I don't really think I need use memcopy for my index data, since I can just base the index I need off the current vertex buffer position. In D3D9 I was able to do this by doing
//Load the indices in the index buffer
indices[currentIndexBufferPosition] = currentVertexBufferPosition;
indices[currentIndexBufferPosition + 1] = currentVertexBufferPosition + 1;
indices[currentIndexBufferPosition + 2] = currentVertexBufferPosition + 2;
indices[currentIndexBufferPosition + 3] = currentVertexBufferPosition + 3;
indices[currentIndexBufferPosition + 4] = currentVertexBufferPosition;
indices[currentIndexBufferPosition + 5] = currentVertexBufferPosition + 2;
Is this possible with Map Resources and D3D11? Or will I need to make a tiny index array just so I can use memcpy?