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

Started by
0 comments, last by b_thangvn 14 years, 7 months ago
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]
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.

This topic is closed to new replies.

Advertisement