Image Blitting

What I would like to do is take a simple array of RGB values (eg. “unsigned char image[xsize * ysize * 3];”)
and be able to copy it directly on the screen.

Is there a simple way of doing this? I tried doing so using glDrawPixels but to no avail - I don’t quite understand what format the data needs to be in.

Thanks in advance

glDrawpixels will work with your data.

(the type is GL_UNSIGNED_BYTE and your format is GL_RGB).


GLUbyte *data;

/* data = malloc… */

glDrawPixels(…, data);