I’m working on a very old application which was originally developed for the Mac and I ported to Windows. The application does some work with images in OpenGL then saves the result. I get good results on AMD cards, but on GeForce cards the results are sometimes very wrong (this depends on the system).
I traced this to some accumulation code which used glReadPixels and did accumulation on the CPU side. Saving the result of glReadPixels I saw that only part of the image was written to the buffer. This is often the top part, but sometimes several rows at the top are written, then some aren’t, then the bottom is written.
I decided to change the code to copy the viewport to a texture using glCopyTexSubimage2D, and then do the accumulation on the GPU side. Again this works well on AMD but shows the same problems on the NVIDIA system I tried it on.
Has anyone encountered this problem? Am I doing something wrong or is it that so few people use these functions that they just aren’t tested and don’t work?
I will try to revise the system to draw directly to a texture instead of the viewport and see if that works. It’s a complex application but I think I can hack this. I’d still appreciate a response about this problem.