Advertisement Jump to content
Sign in to follow this  
BigBeginner

Bitmap from Texture

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

Good afternoon, I created an texture like this: D3DXCreateTexture (Device, W,H, 0, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, TEX); The textura has to be target textura. Later this texture will be sratched. Question is: how do I make an bitmap from this texture? The LOCKRECT method doesn't works... :(

Share this post


Link to post
Share on other sites
Advertisement
Yes, you maybe right... but I have to do more things with the texture... by the way, the "D3DXSaveTextureToFile" function how to access the pixel datas?

Share this post


Link to post
Share on other sites
I don't know how Microsoft implemented the function. It may not even allow you to save it if you can't access the pixels. It may have something to do with your memory management. I would also recommend calling pDevice->CreateTexture() to prevent any incorrect paramaters from going un-noticed, because D3DXCreateTexture may ignore errors. Also, maybe call CheckDeviceFormat to be sure you can create it as a render target.

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!