   [.net] Direct3D.Texture Question.
  <code>Dim aImage As Direct3D.TextureaImage = TextureLoader.FromFile(oDev, "C:\a.bmp")Debug.Write(aImage.GetLevelDescription(0).Height() & vbCrLf)</code>This returns 256 even though the image loaded is 147 pixels high, I want to get the 147.  I can get it by loading the image into an image object, but I'd prefer only loading the image once and geting the information through DirectX.   
  You must load and use textures with sides of a power of 2. It is incorrect to load and use a texture with a side of 147.   ;  Why is it incorrect? It works great texturing this image on a flat surface that is 147 pixels high, but I have to get the 147 height from other sources.. I understand powers of 2 would be more efficient, and thats all well and good, But sometimes I might want to just load a single image and texture it on an object that is 147 pixels high.  Actaully, another reason to be able to get the height of the loaded image would be so that you know it's not a power of 2, then you could take measures to rectify that. Possibly, dividing it up into smaller images that are powers of 2, then using all the smaller images to draw an image of 147 or 169, if using a power of 2. Another option would be to make large textures then paste images onto them, still getting the height when you load the image would be helpfull in this matter. In general are you better off having several small textures or a few large ones?If you wish to see the source code:http://sourceforge.net/project/showfiles.php?group_id=113730;  It has to do with mipmapping as I understand it. I don't know the technical explanation, but this is what all the books I have say about the subject.   ;  Well, as I understand it mip mapping has to do with generating smaller versions of a texture through a filter. For instance, When taking something that was once represented by 16 pixels and now is viewed at a distance and is represented by a single pixel some computation is required to figure out the best color to use for that pixel. So, If we have a base image that is 64x64 in size, the lower levels of detail will be 32x32, 16x16, 8x8, 4x4, 2x2 and 1x1. so, it is most efficient to use an image that is a power of 2; however, you can round up,as DirectX appareantly does automitically, but it's a bit wastefull. I'm not so concerned about this waste in certain circumstances. So as I originally stated, I would like to be able to get the original height of the image loaded without having to load it into a image control.PS: Did you download my source? Critism, comments, opinion are all welcomed.   ;  What video card do you have?If it doesn't support non-powers of two, the texture will automatically be scaled up. You are scaling it back down with the quad you render it onto, which is why you don't notice it.   ;  Raloth, so how would I programmatically get the real size and not the scaled up size? I can do it by loading the image a second time into the DOTNETS standard image object, but there should be a way to get that info through directX.   