Need help copy 2d texture to a layer of 3d texture in DirectX 9
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement