• Advertisement
Sign in to follow this  

How to get the size of a texture?

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

I need to get width and height of a texture.How can I manage this? A simple texture that is loaded with D3DXCreateTextureFromFile. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
IDirect3DTexture9 has a method called GetLevelDesc which returns a surface description (D3DSURFACE_DESC). The surface description has Width and Height members. To get the width and height of your texture, pass 0 as the Level parameter to GetLevelDesc.

For more info, look here

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement