View Full Version : glBlitFramebufferEXT with out-of-bounds src rect
04-17-2007, 03:38 PM
What happens, if the source rectangle exceeds the border of the read buffer, but the destination rectangle does not? What will get copied for the undefined regions? And how is the linear filter defined for samples that lie between valid source pixels and invalid ones?
I tried to find something about that in the specs, but found nothing :( It is not specified what "valid" coordinates are.
04-21-2007, 06:27 PM
The result of sourcing an invalid region is undefined. The only guarantee is that this operation should not cause a crash.
Likewise, if you filter from the boundary between a valid and invalid region, the result is undefined because you cannot predict what values will come from the invalid region.
Just don't do it. :)
04-21-2007, 09:26 PM
glCopyPixels says "Results of copies from outside the window, or from regions of the window that are not exposed, are hardware dependent and undefined."
It would be best if the blit spec explicitly said something similar.
04-22-2007, 04:13 AM
More generally the pixel ownership test in the OpenGL specs chapter 4.1.1 applies.
Considering the part said about framebuffer only:
4.1.1 Pixel Ownership Test
The first test is to determine if the pixel at location (xw, yw) in the framebuffer is currently owned by the GL (more precisely, by this GL context). If it is not, the window system decides the fate the incoming fragment. Possible results are that the fragment is discarded or that some subset of the subsequent per-fragment operations are applied to the fragment. This test allows the window system to control the GL's behavior, for instance, when a GL window is obscured.
Read: Results of any operation where the pixel ownership test failed are undefined.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.