Jump to content
  • Advertisement
Sign in to follow this  
Barguast

[SlimDX] Loading a Texture3D

This topic is 2215 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!