Hi,
I'm having a problem loading a Texture2DArray in SharpDX. This was working in SlimDX but there are some minor changes that I just don't understand or I'm just missing something I guess.
The error message I'm receiving is ...
HRESULT: [0x80070057], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: The parameter is incorrect.
The method I'm calling to map my texture (for loading it into the texture array) is ...
DataBox mappedTexture2D = devices.DeviceDirect3D.ImmediateContext.MapSubresource(singleTextures[texIndex], mipLevel, 0, MapMode.Read, SharpDX.Direct3D11.MapFlags.None, out stream);
mipLevel is 0 for the first pass.
I don't understand why the method uses 'out stream', because a stream isn't required at all, and a DataBox is returned. So I just pass in an unused Stream object to satisfy the method.
The texture seems ok to me ...
ArraySize = 1
BindFlags = ShaderResource
CPUAccessFlags = None
Format = R8G8B8A8_UNorm
Height = 128
MipLevels = 1
OptionFlags = None
SampleDescription = {1, 0}
Usage = Immutable
Width = 128
Any ideas as to what I'm doing wrong ?
Thanks.