Updates a 2D texture that is currently resident on the GPU. You must use this if you wish to update 2D textures, 1D array textures, and cubemaps.
int32 UpdateTexture2D( 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>. The destination position X value must be from 0 to (image width - 1), and the destination position Y value must be from 0 to (image height - 1 ). |
<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. |
None published. Please look for an example in the Scenome Scripting Language code base.