[GRASS-dev] Re: [GRASS-user] [bug #3041] nviz max resolution ppm image dump

Hamish hamish_nospam at yahoo.com
Fri Sep 1 01:31:49 EDT 2006


> > > > With off-screen rendering disabled, I get good results with
> > > > either of the above var_i calculations.
> > > 
> > > The off-screen rendering draws to the back-buffer, GS_write_zoom()
> > > dumps the front buffer. Also, Create_OS_Ctx() hides the Togl
> > > canvas (presumably to prevent expose events from trashing the
> > > OpenGL state during off-screen rendering), so it probably isn't
> > > usable for rendering.
> > > 
> > > Does this help?
> > > 
> > > diff -u -r2.6 do_zoom.c
> > > --- visualization/nviz/src/do_zoom.c	9 Jul 2006 08:58:40 -0000	2.6
> > > +++ visualization/nviz/src/do_zoom.c	31 Aug 2006 12:58:16 -0000
> > > @@ -325,6 +325,9 @@
> > >      }
> > >  #endif
> > >  
> > > +    if (!pbuffer && !glxpixmap)
> > > +	    return 1;
> > > +
> > >      /* hide togl canvas before init_ctx 
> > >       * This prevents bindings from re-initializing
> > >       * togl */
> > 
> > Nope. No change.
> 
> Did you try with GRASS_NO_GLX_{PBUFFERS,PIXMAPS} set?
>
> With those set, and the above patch, Create_OS_Ctx() should
> essentially be a no-op.


I didn't. I have now and it renders correctly; you see each panel being
 rendered in the NVIZ window.

i.e. : This works
+    if (!pbuffer && !glxpixmap)
+	    return 1;
and 
export GRASS_NO_GLX_PIXMAPS=TRUE
export GRASS_NO_GLX_PBUFFERS=TRUE


OR making this test always false makes it work:

/* create off-screen context if possible */
#if defined(OPENGL_X11) && (defined(HAVE_PBUFFERS) || defined(HAVE_PIXMAPS))




it fails with:  (random bits of old windows in built panels)
+    if (!pbuffer && !glxpixmap)
+	    return 1;
  and 
unset GRASS_NO_GLX_PIXMAPS
export GRASS_NO_GLX_PBUFFERS=TRUE


it fails with:  (mostly black with some color stripes in built panels)
+    if (!pbuffer && !glxpixmap)
+	    return 1;
  and 
export GRASS_NO_GLX_PIXMAPS=TRUE
unset GRASS_NO_GLX_PBUFFERS



> > Does max res PPM dump work for anybody? (ie is it a platform
> > dependent thing)
> > 
> > Shall we disable offscreen rendering for the 6.2 release branch in
> > case it doesn't get fixed in time for release?
> 
> It should suffice to ensure that it can be disabled at run time.

or by packagers (say if it's broken for all MacOSX)



Hamish




More information about the grass-dev mailing list