ok my problem is that I have a Texture2DArray g_tx2dArray in my shader, I can load this and it works fine. But now I would like to change its image data at runtime. I was doing this Device->CopySubresourceRegion(destrc,0, 0, 0, 0, pdecalResource,0, NULL);
this works but only when the new resource is the same size or fits in the previous resource.
What would be the best way to copy the lager image to the resource I cant find anything on doing this, may be this
A thought on the issue.
I know now why what I was asking was impossible with out creating a new view for that size(working on it to long).
What about this idea if I have a valid ID3D10ShaderResourceView* which I do, could i some how set these pointers directly, some thing like this
ShaderResourceViewArry = resouretoset;//allready loaded and is a valid view."you can't do it this way"
but I dont know how to acsses the array members, can not find them.
I think I will just have to set one size for all images .
Be sure that your source box for CopySubResourceRegion() is always less than equal to your destination size.
UpdateSubResource allows you to copy data from the CPU to the GPU. Row pitch should be the number of bytes in one row of a texture. Depth pitch is the number of bytes in one slice of a 3d texture. They can be zero if unused. Since the data is coming from the CPU side you should be able to calculate this yourself.
From a SRV you can call QueryInterface() for the ID3DTexture object the SRV was created from. From there you can call GetDesc() to get the dimensions.