Hi,
should there be a difference in pixeldata between glReadPixels() and glCopyTexSubImage2D()?
I am doing the following:
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, m_tex);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, 800, 600, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, 0, 0, 800, 600);
/* could do some processing here ... */
glGetTexImage( GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, GL_UNSIGNED_BYTE, Data);
The Results in Data differ from a call to
glReadPixels(0, 0, 800, 600, GL_RGBA, GL_UNSIGNED_BYTE, Data);
When using 8xS antialiasing (or more) the differences are visible. It seems the results of glGetTexture() are not antialiased properly, but there is some difference to the non-antialiased results…
Running on 7800GTX with 81.95 driver.