GenerateMipMapCount Data Member Function

Generates the number of MIP maps for the <Texture> object's, given the underlying <Image> object's width and height and the specified minimum dimension. For example, if the <Texture> owns an <Image> object that is 1024x1024 pixels, and the minimum dimension is given as 4, this function returns 8, which is the count of <int32> values in the following sequence: 512, 256, 128, 64, 32, 16, 8, 4. Similarly, if the <Texture> owns an <Image> object that is 512x512 pixels, and the minimum dimension is given as 128, this function returns 2, which is the count of <int32> values in the following sequence: 256, 128.

Prototype

int32 GenerateMipMapCount( int32 p_nMinimumDimension )

Parameters

Parameter Type Parameter Name Documentation
int32p_nMinimumDimensionThe minimum acceptable dimension for a MIP map, including width and height. If the dimensions are unequal, then this function will return when either dimension reaches the minimum acceptable dimension.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.