   Surface Vs. Texture
  Now, when dealing with textures, there is a lovely function to load any type of file.  Surfaces, however, it looks like you have to know all the data about a surface before you can load it.  I was just curious, is there anyway to generic-load a surface, no matter what type(ie bitmap,jpg)?  Also, whats the big difference between a surface and a texture?  Would it be reasonable to try and load a surface from a texture, or use a texture like a surface (ie simple 2d graphics)?  
  hmm., i think whatever you can get into textures, you can get into surfaces and vice versa, they''re all just progammable datas.  It''s just because d3d8 suppors quite a bit graphic formats that''s why loading textures is a breeze, ;  GyCott - If you''re asking what I think you''re asking, check out "The Zen of Direct3D Game Programming".  Its one of the Prima Series of books; and in Chapter 8 Peter Walsh (the author) shows you how to use a combination of standard Win32 calls and Direct3D calls to load any JPG, GIF, BMP, PNG, or a couple of other image files in about 20 lines of code.  The trick is to load the object twice.  First with an HBITMAP and BITMAP Windows object (to get the object properties and set up a D3DSurface), and then a second time with the D3DXLoadSurfaceFromFile() utility function (once you have the object dimensions, a surface already setup for it, etc).  I''m currently struggling with the function; but I think it has to do with the class I constructed that uses it.  Loading an object in a non-OOP code-block with that D3DX function is a snap.Check out the book, or email me if you have more questions about this.Take care,--Noel;  If you want to load a file to a SURFACE you could always load to a texture, get its surface and copy it to a new surface. Then release the texture.Neil    WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!  ;  A texture is actually a bunch of surfaces. The texture will have, number of surfaces == number of mip levels.Look under the reference for the IDirect3DTexture8 interface in the SDK doc for more info.  ;  You can load the surface once.  The D3DXIMAGE_INFO will contain the original width and height.  Then you can make a surface of that size and load it again.Avaj - Oh, no, whats my password! 