[sorry for the delay, project deadline approaching fast ;)] Hello Andreas,
Andreas Halm wrote: > I implemented supersampling using a rendercallbackstage with an fbo that has > twice the size of the viewport, and then simply blitting from the fbo to the > viewport. The code works well on my development machine (windows 7 64bit) > but doesn't on the demo machine (vista 32bit). > > I am obviously missing something here ... > > 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()) > glReadBuffer(GL_COLOR_ATTACHMENT0); > glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER,0); > CRect rect; > GetClientRect(rect); > glBlitFramebufferEXT(0,0,pFBO->getWidth(),pFBO->getHeight(), > rect.left,rect.top,rect.right,rect.bottom, GL_COLOR_BUFFER_BIT, GL_LINEAR); > glPopAttrib(); > } > > 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? Cheers, Carsten ------------------------------------------------------------------------------ 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