Does anyone know if there is a function in DirectX to get the dimensions of an LPDIRECT3DTEXTURE9? I just need the width and height. If there isn't, anyone know of a quick and dirty way to accomplish this?
+1
A:
LPDIRECT3DTEXTURE
's may contain multiple images of different sizes. You'll have to specify which one you want (usually 0 is the largest)
D3DSURFACE_DESC surfaceDesc;
int level = 0; //The level to get the width/height of (probably 0 if unsure)
myTexture->GetLevelDesc(level, &surfaceDesc);
size_t size = surfaceDesc.width * surfaceDesc.height;
BlueRaja - Danny Pflughoeft
2010-05-25 14:41:12