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.
int32 UpdateTexture3D( Texture p_oTexture, Image p_oImage, int32 p_nLevel, Int32Vector poSrcPos, Int32Vector p_oOffsets, Int32Vector p_poDims )
Parameter Type | Parameter Name | Documentation |
---|---|---|
<Texture> | p_oTexture | A pointer to the <Texture> object you wish to update. This texture must be resident on the GPU. |
<Image> | p_oImage | A pointer to the <Image> containing the new data you wish to use to update the <Texture>. |
int32 | p_nLevel | The MIP-map level you wish to update. Must be 0 to (MIP map count - 1). |
<Int32Vector> | poSrcPos | A 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_oOffsets | A 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_poDims | A 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. |
None published. Please look for an example in the Scenome Scripting Language code base.