composing layers

Started by
2 comments, last by zedzeek 18 years, 1 month ago
I'm writing an application, and I thought of a method to optimaise my drawing. Basically I will have to compose three layers. - 1 : this one will contain only colors with alpha = 1 - 2 : this one will also contain transparant and semitransparent colors. - 3 : same as two. Right before calling SwapBuffers, I would then compose these three layers to form the final render. If I do it this way, I can easyly update only (parts of) the first layer, and get the desired output without having to rerender (parts of) the 2nd and 3rd layer. Also when nothing has to be redrawn, I should only compose the layers again and call SwapBuffers. My question is : Is there a way to do this with openGL ? I've read about the accumulation buffer, but I don't know if I could do it like that. Does anyone know how I could get my method to work ? Thanks in advance.
Advertisement
No one ?
If it's not possible, feel free to tell me too.
Just an idea, and I havent really thought it through but maybe you can use 3 framebuffer objects to render each layer, then bind them to a fullscreen quad and multitexture it using the 3 framebuffers. I dunno, to tired to think, but look into it :)

Luke.
Member of the NeHe team.
its not 100% clear what youre trying to do, im im dubious about wether or not youll see any perceived performance increase.
u could render 1 or 2 or 3 into a screensized texture (or another offscreenbuffer) + just draw them onto the screen finally as a fullscreenquad.

This topic is closed to new replies.

Advertisement