Hi Carsten, > > > > void MyView::postBlitHQ(OSG::DrawEnv* pEnv) > > { > > glPushAttrib(GL_ALL_ATTRIB_BITS); > > FrameBufferObjectUnrecPtr pFBO = hqstage->getRenderTarget(); > > glBindFramebufferEXT(GL_READ_FRAMEBUFFER,pFBO->getGLId()); > ^^^^^^^^^^^^^ > > does pFBO point to a OSG::FrameBufferObject? In that case getGLId() > does > not give you a real OpenGL id, just one that identifies the real one > across all OpenGL contexts. You need to translate it to a real OpenGL > id > with pEnv->getWindow()->getGLObjectId(pFBO->getGLId()) >
Thank you very much. I now have a completely different solution which is loosely based on the HDRStage, something like fbo -> texture -> glGenerateMipmapEXT -> render quad. That works perfectly. But thank you for clarifying what I did wrong in the first try, that is essential to know. > > On a side note, the last glPopAttrib generates INVALID_OPERATION, > which just > > doesn't make sense at all - any ideas welcome. > > that is indeed strange. I guess you tried inserting a glGetError before > the glPopAttrib and it was good? Of course. To be exact I inserted two glGetErrors before glPopAttrib just to make sure that not the glGetError call itself is the source. I modified the code to save and restore the bound fbo via glGetIntegerv/glBindFramebufferEXT and removed pushattrib/popattrib, now works fine without errors (although I think the code is unnecessary anyway, as my code is the last code executed in the fbo before the framework switches to another render target). Aloha, Andi ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users