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

Glynn Clements glynn at gclements.plus.com
Sat Nov 5 12:49:49 EST 2005


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 at gclements.plus.com>




More information about the grass-dev mailing list