FBO's aren't a direct replacement for PixelBuffer objects so you can't
just miminc a osg::PixelBufferX11 by using a FBO.
FBO's are GL object objects, while PixelBuffer's are graphics
contexts. To create a FBO you need a graphics context. A PixelBuffer
is a graphics context that has it's own frame buffer that isn't
assigned to the display like a GraphicsWindow graphics context.
In the past OpenGL didn't have the ability to render to anything other
than graphics context's frame buffer so to PixelBuffer were the
standard way to doing multi pass rendering. With the advent of
FrameBufferObject OpenGL now had an ability to render to a frame
buffer other than the one assigned to the graphics context for the
purpose of display on the screen, as the FBO is OpenGL object within a
graphics context it's more efficient than using two graphics context
to do render to texture so is very much the preferred way of doing
multipass techniques like Render to Texture used in shadowing,
These days the need for PixelBuffer is much diminished as FBO's work
really well for most applications, however, there are times with
PixelBuffer's are still useful - if you want to render completely
offscreen with any on screen window then a PixelBuffer is a perfect
tool as is still the appropriate tool for the job.
On 8 June 2017 at 17:24, Jeremy Smith <> wrote:
I am trying to profile my Linux application using the NVIDIA Linux Graphics Debugger, but I get an error when I perform a frame capture that the 'glXCreatePbuffer' command is not supported. This command is located in osgViewer/PixelBufferX11.cpp.
From my research it seems that PBuffers have been deprecated in OpenGL and that FBOs should be used instead. This is probably why the debugger doesn't support it.
My question is: Can OSG be configured to use FBOs for the X11 viewer? If not, does anyone have a suggestion on how to modify PixelBufferX11.cpp to use FBOs?
I'm using OSG 3.4.0 and CentOS 7.
Read this topic online here:
Post generated by Mail2Forum