[Paraview] GLXBadContext error when saving to png file

Ondrej Certik ondrej at certik.cz
Fri Feb 22 18:24:03 EST 2008


Hi Berk,

On Fri, Feb 22, 2008 at 11:17 PM, Berk Geveci <berk.geveci at kitware.com> wrote:
> I am guessing this is an OpenGL driver bug. We are using OpenGL
>  framebuffers for offscreen rendering when available. Some drivers
>  claim framebuffers are supported and die horribly when they are used.
>  Try this:
>
>   view.UseOffscreenRenderingForScreenshots = 0
>
>  before the WriteImage() call.

Like this?

$ cat t.py
from paraview import servermanager as sm
sm.Connect()
view = sm.CreateRenderView()
view.StillRender()
view.UseOffscreenRenderingForScreenshots = 0
view.WriteImage("image.png", "vtkPNGWriter", 1)
$ python2.5 t.py
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  159 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  24
  Current serial number in output stream:  24


No luck. Actually, I don't know of any way to save images from paraview except:

* save to pdf, and extract the image from pdf. I didn't find a way to
do this from python (postscript writer fails too)
* using a regular screenshot (in gnome for example) and gimp

Do you know more information about this? I'd like to report a bug
against a proper package (mesa probably), to help figure out what's
wrong.

Thanks,
Ondrej


More information about the ParaView mailing list