SoBufferObjectMap Method (SoBufferObject, SoBufferObjectAccessModes, UInt64, UInt64) |
Maps the current buffer object into the specified buffer object.
Namespace: OIV.Inventor.Devices
public virtual void Map( SoBufferObject targetBufferObject, SoBufferObjectAccessModes accessMode, ulong startPosition, ulong mappingSize )
The buffer object which will be the mapped version of this buffer.
The access mode used for the mapping.
Offset (in bytes) in source buffer to map from (default is start of buffer).
Size (in bytes) from the startPosition, if SO_BUFFER_SIZE_ALL then the whole buffer is mapped.
This is useful in order to use a buffer in multiple contexts. The default is to map the entire contents of this buffer, but it is also possible to map a subset of this buffer's memory using the startPosition and mappingSize parameters.
A source buffer may be mapped into multiple target buffers. However a target buffer can only be mapped from one source buffer at a time. If a different source buffer is currently mapped into the target buffer, it is automatically unmapped and may be left in an undefined state.
Note: If the current buffer is empty or startPosition is beyond the end of the managed memory, the buffer is not mapped (and an error message is issued in debug builds).