[GRASS5] status of Tcl/Tk Aqua support on Mac OS X

As I understand it, in GRASS 6 (or 6.1 CVS at least), the most of the Tcl/Tk interface has been rewritten so that it now runs in Mac OS X's Tcl/Tk Aqua. The part that still needs a UNIX build of Tcl/Tk is NVIZ, and I think that has something to do some X11 program it uses to get window info? Is there any C code in NVIZ that needs the UNIX Tcl/Tk?

Does this sound right? Is 6.0.1 in line with 6.1 CVS?

What are the bits in NVIZ that need the UNIX Tcl/Tk? If an alternative could be found that works with Tcl/Tk Aqua, is it as simple as changing some command references in the Tcl code?

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy

William Kyngesburye wrote:

As I understand it, in GRASS 6 (or 6.1 CVS at least), the most of the
Tcl/Tk interface has been rewritten so that it now runs in Mac OS X's
Tcl/Tk Aqua. The part that still needs a UNIX build of Tcl/Tk is
NVIZ, and I think that has something to do some X11 program it uses
to get window info?

No, that was the tcltkgrass GUI, which has been obsoleted by d.m.

NVIZ needs the Unix/X11 build because it uses OpenGL, which needs
support from the window system.

Is there any C code in NVIZ that needs the UNIX Tcl/Tk?

Yes.

Does this sound right?

No.

Is 6.0.1 in line with 6.1 CVS?

Mostly.

What are the bits in NVIZ that need the UNIX Tcl/Tk?

The Togl widget (OpenGL "canvas" widget for Tk) has two versions of
most of its core functions: one using X11 and glX (functions for
managing OpenGL contexts under X11), the other using Win32 and wgl
(functions for managing OpenGL contexts under Win32).

There are a few glX calls elsewhere in NVIZ, primarily in do_zoom.c.

If an alternative could be found that works with Tcl/Tk Aqua, is it as
simple as changing some command references in the Tcl code?

To make NVIZ work natively on OSX/Aqua, someone would need to modify
Togl and do_zoom.c to include native Aqua and agl (the Apple
equivalent of glX/wgl) implementations.

A related project would be to modify do_zoom.c so that it works with
Win32/wgl. That would allow NVIZ to run natively on Windows. This is
easier than the Mac case, as Togl already includes Win32/wgl support.

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