I have an FBO which i am rendering offscreen to.
Anyway i want to read the contents of this FBO into main memory so I can use it.
I’ve tried …
glGetTexImage <- SLOW
which is slow.
Then i’ve tried creating a PBO
something like this
glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB,10000); glPushAttrib (GL_PIXEL_MODE_BIT); glReadBuffer (GL_COLOR_ATTACHMENT0_EXT); glReadPixels (0,0,textureWidth,textureHeight,GL_BGR_EXT,GL_UNSIGNED_BYTE,BUFFER_OFFSET(0)); pfn_glPopAttrib (); //aviCapture->captureFrame(buffer); glUnmapBufferARB(GL_PIXEL_PACK_BUFFER_ARB); glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, 0);
anyway that works, but its exactly the same speed as just using readpixels with the glReadBuffer(GL_COLOR_ATTACHMENT0_EXT), in some cases it might actually be slower.
My program works at about 75fps normally, with read pixels with PBO attached i get about 18fps. Just using read pixels the conventional way i get also 18fps.
What am I doing wrong ? I appear to be getting no fps improvement at all.
I am using Vista + a quadro 3400/400 card which is something like an nvidia 6800 card.