Sign in to follow this  
rm1768

Lookup texture file creation

Recommended Posts

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this