screenshots

ok so I have this libjpeg for reading and writing jpeg images. For anyone familiar with the libjpeg please help. All I need to know is how to take glReadPixels(0, 0, imageWidth, imageHeight, GL_RGB, GL_UNSIGNED_BYTE, imageBuffer) and somehow convert that into the buffer libjpeg uses which is something like JSAMPLE *buffer. I dont think I am using glReadPixels right. Does anyone have a clue how to do this.

Originally posted by mdog1234:
ok so I have this libjpeg for reading and writing jpeg images. For anyone familiar with the libjpeg please help. All I need to know is how to take glReadPixels(0, 0, imageWidth, imageHeight, GL_RGB, GL_UNSIGNED_BYTE, imageBuffer) and somehow convert that into the buffer libjpeg uses which is something like JSAMPLE *buffer. I dont think I am using glReadPixels right. Does anyone have a clue how to do this.

A lot of place have the source code about using the libjpeg.

Please browse through www.gametutorials.com or http://www.home.no/apron/english/apron.htm?tut_gl which use jpeg as texture file