Jump to content
  • Advertisement
Sign in to follow this  
b_thangvn

Need help copy 2d texture to a layer of 3d texture in DirectX 9

This topic is 3296 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

Hi guys, I want to copy a 2d texture to a layer of 3d texture in DirectX 9. I searched around and got a brief idea of it like this: 1) Create 3d texture using D3DXCreateVolumetricTexture() 2) LockRect the 2d texture 3) GetVolumeLevel for the 3d texture, then LockBox the 3d texture 4) memcpy the 2d texture to 3d texture layer, row by row The problem is I have no idea how to do it in actual code. Does anyone here can provide an actual example code or give me some resources on this subject? Thanks in advance. [Edited by - b_thangvn on September 11, 2009 1:09:54 PM]

Share this post


Link to post
Share on other sites
Advertisement
I figure this one out. Thanks someone for his tremendous help :D. If any one ever need to know how to copy 2d texture to a layer of 3d texture in DX9 just let me know, I would be glad to help.

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!