[SlimDX] Loading a Texture3D

Started by
1 comment, last by louisila 11 years, 9 months ago
Does anyone know how to populate a Texture3D from a series of 2D images? I have a series of PNG images which together form the 3D texture, but I have no idea how to load these with SlimDX. Any help would be appreciated.
Using Visual C++ 7.0
Advertisement
1.Set up an byte[] array in length of (image files)*(pixels count for each file).
2.Starting a loop that reads each image and write each pixel to the byte array by the order.(nested loops of images-vertical-horizontal)
3.Call to Texture3D.FromMemory(device, dataArray).
This is it! I haven't test it but it should work.
You can also use the DirectX Texture Tool From the DirectX SDK.

This topic is closed to new replies.

Advertisement