blitFBO(srcRect, dstRect=None, filter=9729)¶
Copy a block of pixels between framebuffers via blitting. Read and draw framebuffers must be bound prior to calling this function. Beware, the scissor box and viewport are changed when this is called to dstRect.
int) – Interpolation method to use if the image is stretched, default is
GL_LINEAR, but can also be GL_NEAREST.
Blitting pixels from on FBO to another:
# bind framebuffer to read pixels from GL.glBindFramebuffer(GL.GL_READ_FRAMEBUFFER, srcFbo) # bind framebuffer to draw pixels to GL.glBindFramebuffer(GL.GL_DRAW_FRAMEBUFFER, dstFbo) gltools.blitFBO((0,0,800,600), (0,0,800,600)) # unbind both read and draw buffers GL.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0)