|
-
October 18th, 2005, 11:29 AM
#1
Obtain de size of a IDirect3DSurface (x-y)
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
-
October 19th, 2005, 03:41 PM
#2
Re: Obtain de size of a IDirect3DSurface (x-y)
Is the surface representing a full screen or view port?
Gort...Klaatu, Barada Nikto!
-
October 20th, 2005, 06:45 AM
#3
Re: Obtain de size of a IDirect3DSurface (x-y)
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!
-
October 20th, 2005, 09:37 AM
#4
Re: Obtain de size of a IDirect3DSurface (x-y)
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.
Gort...Klaatu, Barada Nikto!
-
October 20th, 2005, 11:29 AM
#5
Re: Obtain de size of a IDirect3DSurface (x-y)
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.
-
October 20th, 2005, 11:39 AM
#6
Re: Obtain de size of a IDirect3DSurface (x-y)
IDirect3DTexture9::GetLevelDesc() fills out a D3DSURFACE_DESC structure that contains all kinds of information about the specified level of a texture, including its dimensions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|