Sign in to follow this  
Barguast

[SlimDX] Loading a Texture3D

Recommended Posts

Barguast    181
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.

Share this post


Link to post
Share on other sites
talhadad    100
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this