[GRASS-dev] [bug #5151] (grass) NVIZ doesn't build in 6.2.0b3 in opengl=aqua

this bug's URL: http://intevation.de/rt/webrt?serial_num=5151
-------------------------------------------------------------------------

Subject: NVIZ doesn't build in 6.2.0b3 in opengl=aqua

Platform: Mac OSX
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: 6.2.0beta3

Error in nviz grass 6.2b3 in OS X environment (not X11) --with-opengl=aqua

....
        include -I/usr/local/grasslib/include -DPACKAGE=\""grassmods"\" -I/src/
grass-6.2.0beta3/dist.powerpc-apple-darwin8.7.0/include \
        -o OBJ.powerpc-apple-darwin8.7.0/do_zoom.o -c do_zoom.c
do_zoom.c: In function 'Destroy_OS_Ctx':
do_zoom.c:395: error: 'dpy' undeclared (first use in this function)
do_zoom.c:395: error: (Each undeclared identifier is reported only once
do_zoom.c:395: error: for each function it appears in.)
make[3]: *** [OBJ.powerpc-apple-darwin8.7.0/do_zoom.o] Error 1
make[2]: *** [nvwish] Error 2

The error is only in NVIZ outside X11 environment.

These rows (file "visualization/nviz/src/do_zoom.c" rows 393-399) have problems in opengl=aqua

-------
#endif
#endif /* OPENGL_X11 */
    XCloseDisplay(dpy);
    dpy = NULL;

    return (1);
}
-------

-------------------------------------------- Managed by Request Tracker

Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=5151
-------------------------------------------------------------------------

Subject: NVIZ doesn't build in 6.2.0b3 in opengl=aqua

Platform: Mac OSX
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: 6.2.0beta3

Error in nviz grass 6.2b3 in OS X environment (not X11) --with-opengl=aqua

....
        include -I/usr/local/grasslib/include -DPACKAGE=\""grassmods"\" -I/src/
grass-6.2.0beta3/dist.powerpc-apple-darwin8.7.0/include \
        -o OBJ.powerpc-apple-darwin8.7.0/do_zoom.o -c do_zoom.c
do_zoom.c: In function 'Destroy_OS_Ctx':
do_zoom.c:395: error: 'dpy' undeclared (first use in this function)
do_zoom.c:395: error: (Each undeclared identifier is reported only once
do_zoom.c:395: error: for each function it appears in.)
make[3]: *** [OBJ.powerpc-apple-darwin8.7.0/do_zoom.o] Error 1
make[2]: *** [nvwish] Error 2

The error is only in NVIZ outside X11 environment.

These rows (file "visualization/nviz/src/do_zoom.c" rows 393-399) have problems in opengl=aqua

-------
#endif
#endif /* OPENGL_X11 */
    XCloseDisplay(dpy);
    dpy = NULL;

    return (1);
}
-------

This has since been fixed in CVS; Destroy_OS_Ctx() currently looks
like this:

int Destroy_OS_Ctx(void)
{
#ifdef OPENGL_X11
#ifdef HAVE_PBUFFERS
    if (pbuffer)
    {
  fprintf(stderr, "GLX -- destroy pbuffer\n");
  glXMakeCurrent(dpy, None, NULL);
  glXDestroyPbuffer(dpy, pbuffer);
  pbuffer = None;
  GS_set_swap_func(swap_togl);
  show_togl_win();
  return (1);
    }
#endif
#ifdef HAVE_PIXMAPS
    if (glxpixmap)
    {
  fprintf(stderr, "Destroy Pixmap and GLXPixmap\n");
  glXMakeCurrent(dpy, None, NULL);
  glXDestroyGLXPixmap(dpy, glxpixmap);
  glxpixmap = None;
  XFreePixmap(dpy, pixmap);
  pixmap = None;
  GS_set_swap_func(swap_togl);
  show_togl_win();
  return (1);
    }

#endif
    XCloseDisplay(dpy);
    dpy = NULL;
#endif /* OPENGL_X11 */

    return (1);
}

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