How to get the size of a texture?

Started by
0 comments, last by Dave Hunt 19 years, 5 months ago
I need to get width and height of a texture.How can I manage this? A simple texture that is loaded with D3DXCreateTextureFromFile. Thanks.
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

This topic is closed to new replies.

Advertisement