[GRASS-dev] Re: [GRASS GIS] #104: saving display to tiff or ppm garbled when NVIZ is not top window

Glynn Clements glynn at gclements.plus.com
Thu Apr 3 18:16:45 EDT 2008


GRASS GIS wrote:

> #104: saving display to tiff or ppm garbled when NVIZ is not top window

> Comment (by msieczka):
> 
>  Replying to [comment:15 glynn]:
> 
> > Can you try the [http://trac.osgeo.org/grass/attachment/ticket/104/
> > do_zoom-error.diff patch]. It installs an error handler which
> > (hopefully) prevents the error from terminating the program.
> 
>  I'm sorry but it does not improve anything for me.

I've submitted an updated patch. If it doesn't work, can you try to
debug it? Specifically, does the error handler get invoked?

[BTW, a note about patching NVIZ: running "make" in the
visualisation/nviz/src directory doesn't install the updated
executable; you have to run "make" in visualisation/nviz.]

The fact that the program terminates is apparently down to the default
error handler. It should be possible to prevent this from terminating
the program; most X applications don't terminate upon error, nor
(AFAICT) does Tk terminate for X errors which it understands.

> Oh well, maybe it is just something about my setup.

I asked on the X.org list, and apparently all DRI-based drivers will
behave this way, regardless of whether or not DRI is actually used. It
doesn't affect the "nv" driver or Cygwin's XWin.exe as those only have
software OpenGL rendering, and the "nvidia" driver has its own
hardware rendering mechanism via nVidia's libGL.

Essentially, the current DRI-based drivers cannot render to a
GLXPixmap, but you can use a GLXPixmap with the
GLX_EXT_texture_from_pixmap extension (which is essentially the sole
reason why glXCreateGLXPixmap() doesn't just fail).

IOW, if we want to be able to test whether we can use a GLXPixmap
(without killing the program if we can't), we have to prevent the
GLXBadContext error from terminating the program.

I'm rather limited in my ability to test this as I don't have any
hardware which uses DRI-based drivers (it's all either software-only
or nVidia's non-DRI-based hardware driver).

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list