GLWRITESAMPLESUN(3gl)GLWRITESAMPLESUN(3gl)NAMEglWriteSamplesSUN - writes a block of raw pixel samples to the current
draw buffer
C SPECIFICATION
void glWriteSamplesSUN( GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
GLvoid *samples )
PARAMETERS
width, height Specify the dimensions of the pixel rectangle. width and
height of one correspond to a single pixel.
format Specifies the format of the sample data. The following
symbolic values are accepted: GL_RGBA, and GL_ABGR,
type Specifies the data type of the sample data. Must be
GL_UNSIGNED_INT_8_8_8_8
samples Buffer that holds sample data
DESCRIPTIONglWriteSamplesSUN writes all of the raw pixel samples from the samples
buffer to the specified color buffer starting from the current raster
position, provided the raster position is valid. Which color buffer to
write to can be specified using glDrawBuffer. Supported draw buffers
are GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT,
GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, GL_FRONT_AND_BACK. Format must be
one of GL_RGBA or GL_ABGR. Type of samples is limited to only
UNSIGNED_INT_8_8_8_8. The size of the pixel rectangle is specified
using width and height arguments.
glWriteSamplesSUN interprets samples in the samples buffer as sample #0
of all pixels followed by sample #1 of all pixels in that order.
Pixel operations such as glPixelMap, glPixelTransfer, glPixelStore, and
glPixelZoom will have no affect on glWriteSamplesSUN.
The buffer should be big enough to hold all samples for all pixels in
the pixel rectangle. That is, the size of the sample buffer is width *
height * num_samples * sizeof(unsigned int), where num_samples per
pixel can be queried using glGetintegerv command by specifying GL_SAM‐
PLES as the parameter value to be returned.
ERRORS
GL_INVALID_ENUM is generated if format or type is not an accepted
value.
GL_INVALID_VALUE is generated if either width or height is negative.
GL_INVALID_OPERATION is generated by glWriteSamplesSUN, if the draw
buffer is not one of GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT,
GL_BACK_RIGHT, GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, GL_FRONT_AND_BACK.
GL_INVALID_OPERATION is generated if glWriteSamplesSUN is executed
between the execution of a glBegin and the corresponding execution of
glEnd.
GL_INVALID_OPERATION is generated if glWriteSamplesSUN is executed on
any other frame buffer that doesn't support this extension.
SEE ALSO
glReadSamplesSUN, glReadVideoPixelsSUN, glReadPixels
13 Aug 02 GLWRITESAMPLESUN(3gl)