OpenGL Images

Images are drawn with glDrawPixels

glDrawPixels(width, height, format, type, pixels)

width & height are the size of the image, in pixels.

format is GL_RGB for RGB images, or GL_LUMINANCE for greyscale (there are also several other possible formats).

type indicates the type of one channel of one pixel's data. Normally GL_UNSIGNED_BYTE, for 8-bit-per-channel images.

pixels is the actual array of image data.


next