View Full Version : glDrawPixels&glReadPixels Unmatched??

09-24-2004, 06:40 PM
I have set up an array image1[]in the host memory, each element in which stores the rgba value(format:GLfloat).Then I use
glDrawPixels(width,height,GL_RGBA,GL_FLOAT,image1) to draw a rectangle image on the screen.
Afterwards, I want to use glReadPixels to restore the buffer image to the host memory (in an array image2[]), but I find the data I get from the "glReadPixels" (image2[])is not the same as the data I use to draw the rectangle image (image1[])
what is the problem?
(I have used the glPixelStorei to set up the correct format of the GL_ALIGNMENT, and I only use single buffer,and I have used the glGetIntegerv to get the raster positon to use in the glReadPixels as the first two parms)
Can someone help me? Thanks in advance!

09-25-2004, 11:45 PM
Please do not crosspost. Pick a forum, prefferably the beginners forum for this type of question, and post once.