Jump to content
  • Advertisement
Sign in to follow this  
hannibar

OpenGL composing layers

This topic is 4480 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!