glCopyPixels is VERY slow
Hello, I am having this very strange problem with glCopyPixels. I have a prerendered background image that I display on the screen and I also have the z-buffer filled with the corresponding values. At some point I want to scroll the image in one direction. For this I use glCopyPixels to move the pixels from the color buffer a little so that I create a scroll effect. In the same time, I want to keep the z-buffer synchronized with the image so I have to also scroll the z-buffer. I use glCopyPixels with GL_DEPTH but it works extremely slow, something like 3 seconds per function call. By contrast, when I use GL_COLOR instead of GL_DEPTH, it takes only a few miliseconds to complete. I've disabled all fragment operations like fog, blending, lighting, texturing, anything I can think of. If I use a combination of glReadPixels and glDrawPixels it works faster than glCopyPixels on z-buffer ! Anybody had the same problem ? Or maybe some alternatives ?
I don't know if it helps, but if I want to draw a fixed image to the screen, I enable an Ortho View, draw a quad across the whole screen (or a specific region) and apply a mipmapped texture (with the same width/height as the quad) onto it.
Works pretty well
Works pretty well
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement