Version 3 (modified by martin, 7 years ago)

--

TclTk

Tcl/Tk is a general interface language that has been around for a long time (http://mini.net/tcl.

It can be downloaded free from http://www.activestate.com for many OS's, especially Mac, Linux & Windows.

I have created a simple OSG viewer based example which creates a floating tcl/tk window from which the scene can be controlled.

The basis of the tcl viewer is:

 load any models on the command line
 set up viewer windows as normal and realize()
 create special event handler (which handles the tcl events every frame).
 start tk BUT don't enter the default TK event loop.
 then Loop {
   sync/update/frame as usual.
 }
 ExitTcl();

The special event handler calls Tcl_DoOneEvent at the end of each frame to handle Tcl/Tk events.

It sounds more complex than it is.

Advantages of Tcl/Tk:

  • Mature technology
  • Cross platform
  • You can have control of tcl event handling (no contention between Tcl & OSG).

A zip file was transmitted on the users net on 26/Nov/2004. I hope this will become part of the download/bazaar area soon.

Geoff M