int   textureloadEx(char* name,loadtexturestruct* txt)

                name: It can be without path, and extension, so it will be from the textures subdirectory like tga.

                                Or you can give the path, and extension. The file format must be tga, jpg, or bmp, with same extension name. And only the tga format includes alpha channel. And it makes mipmap phases automatically.

 

                txt: Texture properties:

type : texture format

xsize,ysize : dimensions of the texture

                mipphase : number of mipmap phases. It can be AUTOMIPMAP (0), so the DirectX will generate the all possiblities.

filter:  The texture load filter. The D3DTEXF_LINEAR will strech the source file into the texture.

mipfilter: When the DirectX make the mipmap phases for original texture, it will use this filter.

 

                [out]: Id of texture.

 

NOTE: the final type, and final dimensions could modify the original values by the video card capabilities.