Hello.
My question is simple. I have an IDirect3DSurface9, and I need to get the size (with & height) in pixels of the surface. I don't see any method that directly get this information... :(
How I can get this data?
Thanks
Printable View
Hello.
My question is simple. I have an IDirect3DSurface9, and I need to get the size (with & height) in pixels of the surface. I don't see any method that directly get this information... :(
How I can get this data?
Thanks
Is the surface representing a full screen or view port?
UPS!!!
Sorry!... The object that I need to obtain the size is a IDirect3DTexture, not an IDirect3DSurface!
The fact is that seems that the IDirect3DTEXTURE interface don't have a method to obtain the width & height of the texture... :P
Thanks for your interest and sorry for the mistake!
I haven't tried this, but it seems like it should work...
1. Call D3DXSaveTextureToFileInMemory() to save the texture to memory.
2. Call D3DXGetImageInfoFromFileInMemory() to get the image dimensions.
Thanks Mike! I will do it in this manner...
However, it's strange that this information (width, height) seems not accesible directly from the IDirect3DTexture :P...
Thanks another time!
Adri.
IDirect3DTexture9::GetLevelDesc() fills out a D3DSURFACE_DESC structure that contains all kinds of information about the specified level of a texture, including its dimensions.