Reads a sub-section of an <Image> back from the GPU.
int32 ReadTextureSubBuffer( Image p_oImage, Texture p_oTex, int32 p_nLevel, Int32Vector p_nOffset, Int32Vector p_nDims )
Parameter Type | Parameter Name | Documentation |
---|---|---|
<Image> | p_oImage | A pointer to the destination <Image>. |
<Texture> | p_oTex | A pointer to the <Texture> that has been bound to the GPU. |
int32 | p_nLevel | The MIP map level to read. |
<Int32Vector> | p_nOffset | A pointer to a <Int32Vector> object where components 0, 1, and 2 store the read offset along X, Y, and Z. For example: to read a 64×64 sub-image of a 256×256 <Texture> starting at the pixel (3, 4), set the [0] and [1] component of this vector to (3, 4). Then set the set the [0] and [1] components of the dimension vector to (64, 64). The [3] component of this vector is not used. |
<Int32Vector> | p_nDims | A pointer to a <Int32Vector> object where components 0, 1, and 2 store the width, height, and depth of the read. The depth value, which is stored in component [2], should usually be 1. For example: to read a 64×64 sub-image of a 256×256 <Texture> starting at the pixel (3, 4), set the [0] and [1] component of the offset vector to (3, 4). Then set the set the [0], [1], and [2] component of this vector to (64, 64, 1). The [3] component of this vector is not used. |
None published. Please look for an example in the Scenome Scripting Language code base.