On 07.10.2015 14:52, Gerrit Voß wrote: > > For your shader problem below, ... > The easiest way around this is to use a SimpleSHLChunk instead ...
I did not know about that one :-( I took a look into the PassiveBackground implementation and it seems that it is quite near to what is needed here if I understand correctly. If ClearFrameBufferObject is set and no ClearCallback is defined it does perform some blitting by osgGlBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, 0) osgGlBlitFramebuffer( pEnv->getPixelLeft (), pEnv->getPixelBottom(), pEnv->getPixelRight (), pEnv->getPixelTop (), pEnv->getPixelLeft (), pEnv->getPixelBottom(), pEnv->getPixelRight (), pEnv->getPixelTop (), (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT), GL_NEAREST); osgGlBindFramebuffer( GL_READ_FRAMEBUFFER_EXT, win->getGLObjectId(pEnv->getActiveFBO())); Am I correct that this blit from the main render buffer into the active FBO? Assume that we store the FBO into the FancyBackground. How do we do the opposite blit operation? glBindFramebuffer(GL_READ_FRAMEBUFFER, my_fbo); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); glReadBuffer(GL_COLOR_ATTACHMENT0); glDrawBuffer(GL_COLOR_ATTACHMENT0); osgGlBlitFramebuffer( pEnv->getPixelLeft (), pEnv->getPixelBottom(), pEnv->getPixelRight (), pEnv->getPixelTop (), pEnv->getPixelLeft (), pEnv->getPixelBottom(), pEnv->getPixelRight (), pEnv->getPixelTop (), (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT), GL_NEAREST); What is my_fbo actually, i.e. where do I get the id of the stored FBO? I have no experience with GL framebuffer handling, so any hints are welcomed. Best, Johannes ------------------------------------------------------------------------------ Full-scale, agent-less Infrastructure Monitoring from a single dashboard Integrate with 40+ ManageEngine ITSM Solutions for complete visibility Physical-Virtual-Cloud Infrastructure monitoring from one console Real user monitoring with APM Insights and performance trend reports Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911&iu=/4140 _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users