CreateD3DTextureFromMultiImage Function
ImagingDirect3D9

Converts images in TDymImageDataArray to one IDirect3DTexture9 texture.

Pascal
function CreateD3DTextureFromMultiImage(const Images: TDynImageDataArray; 
                                        Device: IDirect3DDevice9; 
                                        var Texture: IDirect3DTexture9; 
                                        Width: LongInt = 0; 
                                        Height: LongInt = 0; 
                                        MipLevels: LongInt = 0; 
                                        Usage: LongWord = 0; 
                                        Format: TD3DFormat = D3DFMT_UNKNOWN; 
                                        Pool: TD3DPool = D3DPOOL_MANAGED; 
                                        CreatedWidth: PLongInt = nil; 
                                        CreatedHeight: PLongInt = nil): Boolean;
File

ImagingDirect3D9 (at line 115)

Description

First image in array is used as main mipmap level and additional images are used as subsequent levels. If MipLevels is larger than number of images in array missing levels are automatically generated. If Device supports only power of two sized textures images are resized. If Format is D3DFMT_UNKNOWN then format of input image is used. If desired texture format is not supported by hardware default A8R8G8B8 format is used instead. Width and Height of 0 mean use width and height of main image. MipLevels set to 0 mean build all possible levels. For details on Usage and Pool parameters look at DirectX SDK docs. You can use CreatedWidth and CreatedHeight parameters to query dimensions of created texture's largest mipmap level (it could differ from dimensions of source image).

Related Information
You are here: Symbol Reference > Functions > CreateD3DTextureFromMultiImage Function