Converts an array of vectors from the GPU memory layout ( memory layout may change with padding introduced by certain layout qualifiers such as packed, shared, std430, or std140 ) into the CPU memory layout ( which is a contiguous, unpadded array of values ).
int32 ConvertToCpuMemoryLayout( ProgramConstantInfo p_oInfo, int32 p_bZeroMemory, int32 p_nComponents, Int8Iterator first, Int8Iterator last, Int8Iterator dst )
Parameter Type | Parameter Name | Documentation |
---|---|---|
<ProgramConstantInfo> | p_oInfo | A pointer to a <ProgramConstantInfo> object ( which contains data about the OpenGL configuration of the data ). |
int32 | p_bZeroMemory | Fills the destination memory with zeros before performing the conversion if true. |
int32 | p_nComponents | The number of vector components. For example 2 for vec2, 3 for vec3, or 4 for vec4. |
<Int8Iterator> | first | An iterator at the start of the source range, which must be an array of scalar values containing data that has been read back from the GPU. |
<Int8Iterator> | last | An iterator at the end of the source range, which must be an array of scalar values containing data that has been read back from the GPU. |
<Int8Iterator> | dst | An iterator at the start of the destination. The count of the destination and the vector components determines how much data is copied during the copy operation. For example, if the source scalar array represents four vectors with four components, and the destination contains a single vector, then only one vector's worth of data ( four values ) will be copied. |
None published. Please look for an example in the Scenome Scripting Language code base.