ExtractSlicesFrom2DArrayTexture Data Member Function

Populates a <TypeBuffer> with individual images from the <Texture> object submitted to this function. For example, if the <Texture> contains 10 slices, the <TypeBuffer> will contain 10 <Image> objects.

Prototype

int32 ExtractSlicesFrom2DArrayTexture( Texture src_tex, Image src_img, int32 p_nWidth, int32 p_nHeight, TypeBuffer dst )

Parameters

Parameter Type Parameter Name Documentation
<Texture>src_texA pointer to the source <Texture> object.
<Image>src_imgA pointer to the source <Image> object. This does not have to be the same <Image> object as resident in the <Texture> object, but often it will be.
int32p_nWidthThe width of the output <Image> slice in pixels. All output slices will have the same width.
int32p_nHeightThe height of the output <Image> slice in pixels. All output slices will have the same height.
<TypeBuffer>dstA pointer to the destination <TypeBuffer> that stores the image slices. This <TypeBuffer> object owns the pointers to the newly allocated <Image> objects.

Examples

Copy Text To Clipboard

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