Is there a way to read the raw data inside a ID3D11Texture2D? I want to build a set of vertices and normals from a heightmap texture, but can't figure out how to actually get access to the color data. My assumption was that Map would be the solution, but for whatever reason I can't get it to work (there's no errors, which makes it all the more annoying). Am I approaching this wrong, or am I just screwing up somewhere?

I can use the texture in a shader so it shouldn't be an issue of it not loading properly. I played around with the Usage and CpuAccessFlags, but I'm fairly certain that this is the way they should be set up if I want to just read the texture. As I said, I'm not getting any access errors (or any errors period), the application just exits quietly shortly after starting. PIX isn't helping me either.

Hopefully someone can smash me in the head with the Bat of Knowledge. Thanks in advance!