Jump to content
  • Advertisement
Sign in to follow this  
rm1768

Lookup texture file creation

This topic is 4006 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 All, Can anyone tell me how to create a texture file for lookup table purpose? Is there any tool or source code in DirectX available? Thanks a lot. Simon

Share this post


Link to post
Share on other sites
Advertisement
You can create a texture using Device::CreateTexture (using the SYSMEM pool should do). After that, you can LockRect it to access the raw data, and write the values you want to the texture. When you're done, you can save it to a file using D3DXSaveTextureToFile.

Hope this helps

Share this post


Link to post
Share on other sites
Quote:
Original post by sirob
You can create a texture using Device::CreateTexture (using the SYSMEM pool should do). After that, you can LockRect it to access the raw data, and write the values you want to the texture. When you're done, you can save it to a file using D3DXSaveTextureToFile.

Hope this helps


Thanks!

Share this post


Link to post
Share on other sites
D3DXFillTexture() and D3DXFillTextureTX() are also useful if you can't be bothered with all the plumbing surrounding a LockRect() call. Although note that this route probably isn't a good idea if you need specific bit-level control over the results...

hth
Jack

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!