UpdateTexture3D Data Member Function

Updates a 3D texture that is currently resident on the GPU. You must use this if you wish to update 3D textures, 2D array textures, and cubemap array textures.

Prototype

int32 UpdateTexture3D( Texture p_oTexture, Image p_oImage, int32 p_nLevel, Int32Vector poSrcPos, Int32Vector p_oOffsets, Int32Vector p_poDims )

Parameters

Parameter Type Parameter Name Documentation
<Texture>p_oTextureA pointer to the <Texture> object you wish to update. This texture must be resident on the GPU.
<Image>p_oImageA pointer to the <Image> containing the new data you wish to use to update the <Texture>.
int32p_nLevelThe MIP-map level you wish to update. Must be 0 to (MIP map count - 1).
<Int32Vector>poSrcPosA pointer to the <Int32Vector> that contains the source positions. Component[0] = source position X, which determines the x pixel coordinate of the location that will be read from in the source <Image>. Component[1] = source position Y, which determines the y pixel coordinate of the location that will be read from in the source <Image>. The source position X value must be from 0 to (image width - 1), and the source position Y value must be from 0 to (image height - 1 ).
<Int32Vector>p_oOffsetsA pointer to the <Int32Vector> that contains the destination positions. Component[0] = destination position X, which determines the x pixel coordinate of the location that will be written to in the destination <Texture>. Component[1] = destination position Y, which determines the y pixel coordinate of the location that will be written to in the destination <Texture>. Component[2] = slice/layer index, which determines the slice/layer written to in the destination <Texture>. This may be a slice/layer of a 3D texture, a slice/layer face of a 2D array texture, or a layer-face of a cubemap array. In the case of a 2D array texture or 3D texture, valid indices are from 0 to (array count - 1). In the case of a cubemap array, a cubemap array with 2 cubemaps has 12 layer faces with valid indices from 0-11. A cubemap array with 3 cubemaps has 18 layer-faces with valid indices from 0-17. The destination positions must respect the boundaries of the individual slices/layers or cubemap layer-faces, and the slice index must respect the number of slices/layers.
<Int32Vector>p_poDimsA pointer to the <Int32Vector> that contains the write dimensions. Component[0] = width X, which determines the x pixel width of the source <Image> that will be written to the destination <Texture>. Component[1] = height Y, which determines the y pixel height of the source <Image> that will be written to the destination <Texture>. The width and height values must respect the source <Image> dimensions and the render dimensions of the destination <Texture> being updated. Component[2] = depth, which must be a minimum of 1. For certain types of update operations, using a larger depth value, such as 2 or 3, will allow you to update 2 or 3 or N slices with one write.

Examples

Copy Text To Clipboard

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