Unfortunately in order to use the toolkit you really have to use the whole framework. It's kindof an XNA like superstructure which unfortunately I have already emulated myself in many respects. I have to merge SharpDX's XNA-like stuff with my XNA-like stuff. Did I say a month? I meant two months.
[SharpDX]Loading Multiple Images into a Texture Array
Ok, I think I have the SharpDX Toolkit stuff sorted out, but i haven't tested it. I have one question in regards to my intended use of this texture array.
In the old days, branching in a pixel shader was seen as very expensive. I am using these textures in an array to paint rivers, but many hexes won't have rivers. In my shaders, is it better to say "if texture exists sample it" or is it better use an empty dummy texture and say "always sample"?
Still working on this and failing miserably. The SharpDX Toolkit is not working out for me. There isn't enough support available and I'm not comfortable enough with DX11 to really understand how it helps me or what it is trying to make easier. The samples are extremely thin. Trying to use the toolkit in a piecemeal way is leading to strange D3D errors.
I'm still trying to find a C# way to:
Load a series of images,
generate mipmaps for them automatically,
put them all into a single Texture2D to be used as a texture array with mipmaps.
When I find it, I'll post it.
Ok, I finally found something that works! I posted my solution on the OP. Let me know if anyone sees anything grossly unnecessary or that can be improved.
The steps in english are:
I'm using WIC to load the files.
Then I create an empty texture with the appropriate number of array slices and mip slices.
Then I interleave all of the individual bitmap data into the mip 0's.
Create a ShaderResourceView.
Then, just my luck, the GenerateMips function can handle texture arrays with a single call!
I looked at my texture array in PIX and it all looks good!