[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Issues with sharing resources across contexts
On Fri, Aug 24, 2012 at 7:52 PM, Gregg Tavares (社用) <firstname.lastname@example.org> wrote:
That's exactly my thinking, it would simplify the design of the resource sharing because you wouldn't have to consider main page canvasii compositing.
Semantically that all works for me, I find I wouldn't have a preference if we call this attaching a buffer to an FBO or binding a different frontbuffer.
There's one area where the FBO semantic does have an advantage though. If you display partials (like say albedo of a scene) and then re-use the filled depth buffer to render something else (like say deferred lighting) and you have, for some reason, the desire to show both on the page (It's not contrieved, I promise, I have such an example right now, releasing it in the next few days). Since there isn't a way to attach (or even explicitly obtain) the depth buffer for use on the front, you couldn't wire your rendering together to share it. So what you'd end up doing would be to render to an FBO and then sample that FBO to blit to the canvas. It's still way better than the alternatives, just slightly inelegant (if you could do it more directly). On the other hand, if you feel the API is much cleaner with the bind frontbuffer semantic, I don't think that's a big drawback.