[osg-users] PBuffer causing error when profiling on Linux

Skip to first unread message

Jeremy Smith

Jun 10, 2017, 3:34:32 PM6/10/17
to osg-...@lists.openscenegraph.org

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.

Thank you!

Read this topic online here:

osg-users mailing list

Robert Osfield

Jun 11, 2017, 8:18:56 AM6/11/17
to OpenSceneGraph Users
Hi Jeremy,

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,
lighting etc.

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.

Reply all
Reply to author
0 new messages