   DirectX Release vs. Debug Bug
  Noticed what seems like a bug to me with the release version of DirectX. When I am using the debug version the code D3DXCreateTextureFromFile(pd3dDevice,"MobStateFlags.tga", &TexStateFlags);int iStateTexDim = TexStateFlags->Width;sets iStateTexDim to 1024, which is correct. However with the release version it is set to 21. I am wondering if anyone else has encountered this or something similar.I am using the June '08 sdk, vsc++ 2005 express, and am switching between the 2 versions using dxcpl.exe.Any input would be great.thanks-vsEDIT: for now I am getting around it like this: D3DXIMAGE_INFO pSrcInfo;char* stTexFile = "MobStateFlags.tga";D3DXGetImageInfoFromFile(stTexFile,&pSrcInfo);D3DXCreateTextureFromFile(pd3dDevice,stTexFile, &TexStateFlags);iStateTexDim = pSrcInfo.Width;which is probably the more correct way to do it anyway.   
  IDirect3DTexture9 doesn't have a "Width" member...if you want the dimensions of a texture's top-level surface you need to use IDirect3DTexture9::GetSurfaceLevel.   ;Quote:Original post by MJPIDirect3DTexture9 doesn't have a "Width" member...if you want the dimensions of a texture's top-level surface you need to use IDirect3DTexture9::GetSurfaceLevel.Those are a part of the additional debugging tools, but unfortunately they are out-of-date. Some of the values are swapped. Avoid using these. You need to set a define for them to show up.   ;Quote:Original post by sirobQuote:Original post by MJPIDirect3DTexture9 doesn't have a "Width" member...if you want the dimensions of a texture's top-level surface you need to use IDirect3DTexture9::GetSurfaceLevel.Those are a part of the additional debugging tools, but unfortunately they are out-of-date. Some of the values are swapped. Avoid using these. You need to set a define for them to show up.Thanks to you both. I came across them just from intelesence and I sorta knew I was doing something wrong as they weren't in the docs. Anyway I've already moved away from them, but I like knowing why they were there in the first place.-Thanks.   