Framebuffer blitting catch

Sorry for the recent lack of updates – I’ve been pushing pedal to the metal for some time now in my commercial life, in which an interesting and challenging project emerged and took control of all my development mana. What can you do.

I don’t expect the situation to change till the end of July, so in absence of time I’d have to spend to prepare some more engaging posts, I decided to share some quickly-hackable GL/GLES hints that caught me off-guard @ work. Hope they save somebody’s effort!

Here’s a piece that is far from obvious (at least it was a far cry from being one for me! 🙂 ) and which had me blocked for a day or two before I found out what the actual reason for the rather baffling misbehavior was:

Framebuffer blits are affected by scissor test.

In other words, if you care about having your data transffered from one attachment point of your read framebuffer to another attachment of your draw framebuffer as a whole, make sure you either use a sufficiently large scissor window (slippy) OR disable it before you call glBlitFramebuffer() (safer). Trust me, it won’t hurt and can potentially save you a lot of hassle.

Leave a Reply

Your email address will not be published. Required fields are marked *