Name
gl.DrawPixels -- write a block of pixels to the frame buffer
Synopsis
gl.DrawPixels(width, height, format, pixelsArray)
Function
This function does the same as gl.DrawPixelsRaw() except that the pixel data is not passed as a raw memory buffer but as a table containing width*height number of elements describing a pixel each. This is of course not as efficient as using raw memory buffers because the table's pixel data has to be copied to a raw memory buffer first.

Note that gl.DrawPixels() expects data of type #GL_FLOAT inside the pixelsArray table.

See gl.DrawPixelsRaw for more details on the parameters accepted by this function.

Please consult an OpenGL reference manual for more information.

Inputs
width
specify the width of the pixel rectangle to be written into the frame buffer
height
specify the height of the pixel rectangle to be written into the frame buffer
format
specifies the format of the pixel data (see above for supported formats)
pixelsArray
specifies an array containing the pixel data; data in this array is treated as #GL_FLOAT

Show TOC