ReadBuffer Data Member Function

Reads a rectangular region of the active framebuffer into the specified <Image> object. It may be any buffer that is part of the frame buffer (depth or visual buffers, including MRTs), whether the "primary" buffer of the context, or a user-defined buffer. This is defined in part by the format of the <Image> object.

Prototype

int32 ReadBuffer( Image p_oImage, int32 p_nDestX, int32 p_nDestY, int32 p_nDestWidth, int32 p_nDestHeight, int32 p_nSourceX, int32 p_nSourceY )

Parameters

Parameter Type Parameter Name Documentation
<Image>p_oImageThe method stores the buffer contents into this <Image>, in the requested format. The method will read depth or stencil buffers only if the image format is a depth or stencil format. The method will clip the destination rectangle to the boundaries of the image, and the implied source rectangle to the range of the active read buffer. The method does not modify portions of the destination image outside the clipped range.
int32p_nDestXThe method stores into the image starting at this X coordinate, unless clipped, in which case the method will use the nearest valid X coordinate.
int32p_nDestYThe method stores into the image starting at this Y coordinate, unless clipped, in which case the method will use the nearest valid Y coordinate.
int32p_nDestWidthThe method writes this many columns of the destination image, unless clipped, in which case the method writes as many columns as possible, until hitting the boundary of the destination image or the source buffer.
int32p_nDestHeightThe method writes this many rows of the destination image, unless clipped, in which case the method writes as many rows as possible, until hitting the boundary of the destination image or the source buffer.
int32p_nSourceXThe method begins reading pixels at this column's X coordinate.
int32p_nSourceYThe method begins reading pixels at this row's Y coordinate.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.