Hi,
I am mighty confused with the different formats used for storing pixels ??? RGBA format is true color and must therefore hold at least 24 bits per pixel but, in the “Jumping into JOGL” java.net example (link http://today.java.net/pub/a/today/2003/09/11/jogl2d.html) I notice the GL_RGBA format is used along with a GL_UNSIGNED_BYTE type.
gl.glDrawPixels (dukeWidth, dukeHeight,
gl.GL_RGBA, gl.GL_UNSIGNED_BYTE,
dukeRGBA);
As an unsigned byte would be 8 bits, what is the point of using RGBA when only 8 bits are being drawn per pixel? I am only interested as the images I use never have more than 2 colors per image. Is there some more efficient method of storing my pixel data before drawing them rather than using GL_RGBA format as in the “Jumping into JOGL” example.
Any explanations, links, advise or code highly appreciated.
Thanks,
Sally