1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
|
<html>
<!-- vi:set sw=2: -->
<!--
Copyright (C) 1996-2002 Brian Paul and Ben Bederson
Copyright (C) 2005-2008 Greg Couch
See the LICENSE file for copyright details.
-->
<head>
<title>Downloading and Installing Togl</title>
</head>
<body>
<script language="javascript" src="header.js"></script>
<script language="javascript">
NavigationBar();
</script>
<h1 align="center">Downloading and Installing Togl</h1>
<h2>Contents</h2>
<ul>
<li><a href="#prereq">Prerequisites</a>
<li><a href="#getting">Downloading</a>
<li><a href="#building">Installing</a>
<ul>
<li><a href="#x11">X11 usage</a>
<li><a href="#windows">Windows 95/NT/2000/XP usage</a>
<li><a href="#macosx">Mac OS X usage</a>
</ul>
<li><a href="#version">Version History</a>
</ul>
<hr>
<h2><a name="prereq">Prerequisites</a></h2>
<p>
You should have
<a href="http://www.tcl.tk/">Tcl and Tk</a>
installed on your computer.
Togl works with Tcl/Tk version 8.1 and up
(all recent testing has been with version 8.4).
The Mac OS X version requires version 8.4
(note: versions 8.4.12 and 8.4.13 have a bug when unmapping Togl widgets).
<p>
You must also have
<a href="http://www.opengl.org">OpenGL</a> or
<a href="http://www.mesa3d.org">Mesa</a>
(a free alternative to OpenGL with the same API)
installed on your computer.
<p>
And one should be familiar with Tcl, Tk, OpenGL,
and C programming to use Togl effectively.
<br>
<h2><a name="getting">Downloading Togl</a></h2>
<p>
Togl can be downloaded from
<a href="http://sourceforge.net/project/showfiles.php?group_id=519">
SourceForge</a> Files page.
<p>
Several prebuilt binary distributions are available
as well as a source distribution.
<h2><a name="building">Installing Togl</a></h2>
<h3>Installing prebuild binaries</h3>
<p>
Prebuilt binaries provide a Togl2.0 directory,
the togl.h, togl_ws.h and toglDecls.h include files,
and the togl stub library
(libToglstub2.0.a or Toglstub20.lib, <i>etc</i>).
The Togl2.0 directory needs to copied
into one of the directories on Tcl's package path
(type <code>puts $auto_path</code> in the Tcl interpreter to see
the list of directories).
If you have C code that needs to access Togl's subroutines directly,
place the include file in the same place as Tcl's include file and
the stub library in the same place as Tcl's stub library.
<h3>Installing from source</h3>
<p>
Togl uses the Tcl Extension Architecture to be able to build on the
same platforms Tcl can be built on.
In addition to the Togl source,
you will need to have the Tcl and Tk source distributions
because not all installations have the needed Tcl and Tk internal header files.
<p>
How you link with Togl depends on how you're planning to use it.
There are basically three ways of using Togl with your application:
<ul>
<li>
Install the Togl shared library and pkgIndex.tcl file
(using <code>make install</code>)
and link to the Togl stubs library with your executable or shared library.
In this case you must call Togl_InitStubs() (and probably Tcl_InitStubs()
— Tk_InitStubs is only needed if you call Tk functions).
This is the way the included Togl examples are built.
<li>
Link to the Togl shared library
or "compile in" the Togl object files
with your executable or shared library.
In this case you must call Togl_Init() from your C code
to initialize Togl.
<li>
Install the Togl shared library and pkgIndex.tcl file
(using <code>make install</code>)
and then load it using Tcl commands or Tcl_PkgRequire().
Then use Tcl commands to create and manipulate the Togl widget.
</ul>
Since Togl is compiled into a shared library using the Tcl/Tk stubs-interface,
the same binary can be used with any version of Tck/Tk from 8.1 and up.
See <code>README.stubs</code> for more info.
<p>
Specific platform notes follow:
<h4><a name="x11">Unix/X11 usage</a></h4>
<p>
Unix/X systems only need the public Tcl/Tk include files.
Just <code>configure</code>, <code>make</code>,
and optionally <code>make install</code>.
<h4><a name="windows">Windows 95/NT/2000/XP usage</a></h4>
<p>
Windows platforms need <code>tkWinInt.h</code>
and other internal Tk header files. So you need a Tcl/Tk
source distribution in addition to the Togl distribution
(or copy over the various include files).
<p>
Here's the minimal way to build Togl with Tcl/Tk
using the <a href="http://gcc.gnu.org">gcc</a> that is distributed
as part of the <a href="http://cygwin.com/">cygwin</a> tools
(<a href="www.microsoft.com">Microsoft</a>'s compilers work too):
<blockquote><code><pre>
VER=8.4.12
SRCDIR=`pwd`
cd $SRCDIR/tcl$VER/win
env 'CC=gcc -mno-cygwin' ./configure --enable-threads
make libtclstub84.a
cd $SRCDIR/tk$VER/win
env 'CC=gcc -mno-cygwin' ./configure --enable-threads
make libtkstub84.a
cd $SRCDIR/Togl2.0
env 'CC=gcc -mno-cygwin' ./configure --with-tcl=../tcl$VER/win --with-tk=../tk$VER/win
make
</pre></code></blockquote>
The resulting <code>Togl20.dll</code> and <code>pkgIndex.tcl</code>
should be installed into your Tcl installation just like any other package.
<p>
If you change all of the above <code>make</code>'s
to <code>make install</code> instead,
then the Togl package is installed correctly.
<h4><a name="macosx">Mac OS X usage</a></h4>
<p>
These special instructions are for building the Aqua version of Togl.
Mac OS X needs <code>tkMacOSXInt.h</code>
and other internal Tk header files.
Unfortunately, the Tcl and Tk frameworks that Apple distributes
are missing the internal headers.
So you need a Tcl/Tk source distribution in addition to the Togl
distribution (or copy over the various include files).
You would probably want a newer version of Tcl and Tk anyway
because each minor revision of 8.4 has many Aqua bug fixes.
<p>
Here's one way to build Tcl, Tk, and Togl on Mac OS X
(assuming they are all in the same directory)
to install in your home directory:
<blockquote><code><pre>
VER=8.4.12
mkdir -p ~/bin
make -C tcl$VER/macosx install PREFIX="${HOME}" INSTALL_PATH="${HOME}/Library/Frameworks"
make -C tk$VER/macosx install PREFIX="${HOME}" INSTALL_PATH="${HOME}/Library/Frameworks" APPLICATION_INSTALL_PATH="${HOME}/Applications"
cd Togl2.0
./configure --prefix="${HOME}"
make install
</pre></code></blockquote>
<br>
<h2><a name="version">Version History</a></h2>
<h3>Version 1.0 — March, 1996</h3>
<ul>
<li>Initial version
</ul>
<h3>Version 1.1 (never officially released)</h3>
<ul>
<li>Added Togl_LoadBitmapFont function
<li>Fixed a few bugs
</ul>
<h3>Version 1.2 — November, 1996</h3>
<ul>
<li>added swapbuffers and makecurrent Tcl commands
<li>more bug fixes
<li>upgraded to suport Tcl 7.6 and Tk 4.2
<li>added stereo and overlay plane support
<li>added Togl_Get/SetClientData() functions
<li>added Togl_DestroyFunc()
</ul>
<h3>Version 1.3 — May 2, 1997</h3>
<ul>
<li>fixed a bug in Togl_Configure()
<li>fixed a compilation problem in using Tcl_PkgProvide() with Tcl < 7.4
<li>new overlay functions: Togl_ExistsOverlay, Togl_GetOverlayTransparentValue,
Togl_IsMappedOverlay, Togl_AllocColorOverlay, Togl_FreeColorOverlay
<li>added X11 functions: Togl_Display, Togl_Screen, Togl_ScreenNumber,
Togl_Colormap
<li>added Togl_DumpToEpsFile function
<li>fixed a C++ compilation problem
<li>more robust overlay code
<li>added timers (Togl_TimerFunc) from Peter Dern and Elmar Gerwalin
</ul>
<h3>Version 1.4 — September 17, 1997</h3>
<ul>
<li>ported to Windows NT (Robert Casto)
<li>updated for Tcl/Tk 8.0
<li>added many config flags (-redsize, -depthsize, etc) (Matthias Ott)
<li>added Togl_Set*Func() functions to reassign callback functions (Matthias Ott)
<li>added Togl_ResetDefaultCallbacks() and Togl_ClientData() functions (Greg Couch)
</ul>
<h3>Version 1.5 — September 18, 1998</h3>
<ul>
<li>fixed a few Unix and Windows compilation bugs
<li>added Ben Evan's SGI stereo functions
<li>multiple expose events now reduced to one redraw
<li>destroying Togl widgets caused problems, patched by Adrian J. Chung
<li>added Togl_TkWin() function
<li>updated for Tcl/Tk 8.0p2
<li>added gears demo from Philip Quaife
<li>added <code>-sharelist</code> and <code>-sharecontext</code> config flags
<li>fixed a few overlay update bugs
<li>added <code>-indirect</code> config flag
</ul>
<h3>Version 1.6 — May 7, 2003</h3>
<ul>
<li>added Togl_SetTimerFunc function
<li>updated for Tcl/Tk 8.0.5 and 8.1
<li>context sharing added for Windows
<li>Macintosh support (by Paul Thiessen)
<li>Tcl/Tk stubs support — see README.tcl (by Jonas Beskow)
</ul>
<h3>Version 1.7 — Jan 2006</h3>
<ul>
<li>added Mac OS X support
<li>enabled asking for quad-buffered stereo pixel formats on all platforms
(use -oldstereo on SGIs for splitscreen stereo — C API changed too)
<li>configuring the cursor is no longer slow
<li>added <code>-pixelformat</code> config flag
<li>added setgrid support (unfortunately many window managers can't cope with 1x1 pixel grid)
<li>only free context when last reference is gone
<li>switched to TEA-based configure (instead of editting make files)
</ul>
<h3>Version 2.0 — Apr 2008</h3>
<ul>
<li>stubified C API
<li>replaced EPS support with TK photo image support
<li>simplified C API by requiring callback command options
<li>Added command arguments for create, destroy, etc. callbacks,
so there is a -createcommand option to the togl command (etc.).
(and removed Togl_*Func from the C API)
<li>added togl instance commands that call C API —
see <a href="tclapi.html">documentation</a>
<li>use Tcl objects internally
<li>use Tcl object interface for callbacks
<li>vertical sync control
<li>fix thread safety in anticipation that OpenGL drivers may someday be thread safe
<li>added simple stereo rendering interface
<li>revised font C API
<li>updated font support for Tk 8.4 on all platforms
<li>updated documentation
<li>prebuilt binaries
</ul>
<br>
<h3>Future plans</h3>
Patches for the following are especially welcome:
<ul>
<li>multisampling support (can be worked-around by passing in a pixelformat)
<li>pbuffers
<li>Tk 8.5 fonts
<li>EGL support
<li>RGB overlays
<li>Tcl access to colormap manipulation
<li>more Aqua support
</ul>
<hr>
Hosted by <a href="http://sourceforge.net/">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=519&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" align="middle"/>
</a>
</body>
</html>
|