Abstract
Downloads
- Software
- Complete TkOGL Files
- Source Code
- Papers
- Sample Applications
Revision History
Related Links
release notes
Contact Information
TkOGL is a package extension to the Tcl scripting language that enables a user to utilize OpenGL,
a standard Application Program Interface for writing 3D computer graphics programs. It does this
through three separate packages, one of which, TkOGL, creates a canvas that displays the results
of OpenGL commands. These commands are contained in the other two packages, OpenGL and OpenGLU.
Each OpenGL command can then be accessed by a command in Tcl, thus allowing a quick and easy way to
add OpenGL graphics to an application, a process which is much more complicated without TkOGL.
Tcl/Tk is a scripting language created by John K. Ousterhout of the University of California,
Berkley during the early 1990s. It allows users to create custom Graphical User Interfaces (GUIs)
through a simple language consisting of two components. These are the Tool Command Language (Tcl),
which is the actual scripting language and interpreter, and the widget generator, the Tool Kit (Tk).
Tcl allows users to add new functions to its scripting language quickly and easily by loading a library
that integrates new commands into the language. One of these extensions is the Tool Kit. This Tool Kit
is just a set of further commands that allow a user to create GUIs, like buttons.
The Open Graphics Library (OpenGL) consists of hundreds of library functions that render both 2D and 3D
graphics using a Z-buffer or depth-buffer algorithm. OpenGL does not work with individual pixels, but rather,
it allows users to work with points, lines, polygons and images among others. The user can specify the window size,
virtual camera position, orientation, position and other characteristics of the object being created. An OpenGL
object actually consists of several geometric primitives (points, lines, etc) which are manipulated to produce the
final result. For TkOGL, this graphics library has essentially been split up into two parts, the OpenGL and OpenGLU
libraries. The latter is primarily used to draw specific solid objects like spheres, and is not required as often,
so by breaking up the library, the OpenGLU portion does not have to be loaded if it is not required.
The current version of TkOGL requires Tcl/Tk to be installed on the user's computer. The version of Tcl/Tk
that should be used is 8.0.5. Please refer to the Downloads section for links. Additionally, the computer
must support OpenGL.
To get TkOGL up and running in a matter of minutes, follow these instructions:
Downloads
|
|
| TkOGL Version 3.0 |
The current version of TkOGL has been made into an installation package for
easy downloading and configuration. The self-extracting file available for
download contains the three dynamically linked libraries (tkogl.dll, opengl.dll,
openglu.dll) and their associated package index files. Simply run the executable,
and follow the on-screen instructions to install TkOGL. All that is required then
is to type 'package require Tkogl' when Tcl is opened to load tkogl.dll, replacing
'Tkogl' by 'opengl' or 'openglu' to load that particular .dll.
|
|
Tcl/Tk Version 8.0.5 is available for free download from the following sites:
Scriptics.com
Tcl/Tk.org
Please note that the downloadable version of TkOGL 3.0 is not currently compatible
with the newest release of Tcl/Tk (8.3.2). However, please feel free to use
the source files available below to recompile with Tcl/Tk 8.3.2.
|
| TkOGL Version 1.0 |
Claudio Esperanca's original version of TkOGL.
|
|
|
| TkOGL source files |
This zip file contains everything you will need to re-build the .dlls. Initially,
the paths in the makefiles are set up to assume that the TkOGL directory is on the
Windows desktop. If it is not, just change the paths to suit. Further instructions
regarding compilation are available in the README file included in the zip. Additionally,
there is also a utility within this file to construct the TkOGL installation wizard.
It has been placed in the tkogl\install subdirectory. Running the wizard.bat places
all of the necessary files in the tkogl\install\wizard folder, and by zipping this
folder, the installation wizard is created.
|
|
Note that you will also need the following three packages to compile.
|
| Tcl source code |
Necessary to compile TkOGL source files.
|
| Tk source code |
Necessary to compile TkOGL source files.
|
| SWIG 1.1p5 |
Necessary to compile TkOGL source files.
|
|
|
|
The OpenGL and OpenGLU source codes are actually wrapper codes that register each
OpenGL command as an Tcl command. These wrapper codes were generated through the
use of the Simplified Wrapper and Interface Generator (SWIG)
code automation tool.
|
| TkOGL v3.0 |
The source code to one of the dynamically linked libraries found in the
installation package. This was compiled using Microsoft Visual C++ Professional
Edition, Version 6.0 Compiler to create the .dll.
|
| OpenGL |
The source code to one of the dynamically linked libraries found in the
installation package. This was compiled using Microsoft Visual C++ Professional
Edition, Version 6.0 Compiler to create the .dll.
|
| OpenGLU |
The source code to one of the dynamically linked libraries found in the
installation package. This was compiled using Microsoft Visual C++ Professional
Edition, Version 6.0 Compiler to create the .dll.
|
|
|
| TkOGL - Integrating Tcl and Open GL |
Joel Joyner's EECE 496 report that discusses in more detail the relationship
between Tcl/Tk, TkOGL and OpenGL. It also provides an overview of the commands
available in TkOGL Version 3.0.
|
| A Tk OpenGL Widget 1997 |
A link to Claudio Esperanca's paper on TkOGL.
|
|
|
| Nuclear Magnetic Resonance demos |
NMR technology is the equivalent of the Magnetic Resonance Imaging (MRI)
technology used to scan human bodies. It operates on the fact that nuclei of
certain molecules show differing responses when immersed in a static magnetic
field, which later exposed to a second changing magnetic field. Recording these
responses provides a useful analytic tool. The visualization of NMR can sometimes
be difficult because of its dynamic and 3D nature, so these scripts were created
to demonstrate its various properties.
|
| Updated demos |
These are the original TkOGL demos that were released in Version 1.0,
but have now been updated to use the new commands available in TkOGL v3.0
|
Revision History
Since the original version of TkOGL was released by Claudio Esperanca in
1997, three major revisions have been made. The changes made in each will
be briefly detailed here.
Organization - Spring 2001, EECE 285 Group 5 - Henry Cheng, Freddy Cheung,
Eugene Lau, Eve MacGregor, Farnoush Mirmoeini and Granaz Ziaghazvini
- Developed official website for TkOGL version 3.0
- Created an installation wizard to install TkOGL
- Made changes to the opengl and openglu source codes to allow package index files to be generated for all three .dlls
- Converted selected Nuclear Magnetic Resonance demos from TkOGL version 1.0 to 3.0
Version 3.0 - Winter 2000, EECE 496 - Joel Joyner
- Added support for drawing fonts in the TkOGL window
- Divided opengl.dll into opengl.dll and openglu.dll. The AUX functions of OpenGL were also eliminated from the libraries
- Because of revisions to the TkOGL code, some original code became unnecessary and was eliminated
Version 2.0 - Spring 2000, EECE 285 Group 4 - Henry Chan, Geoffrey Clark,
Frank Ho, Erin Lim, Ivan Sun, Nicholas Tsang, Herbert Wong and Kin Yeung
- The command calling structure of OpenGL was changed so that the original structure of the OpenGL commands could be maintained
- Elimination of the need for display lists
- Implementation of support for multiple TkOGL windows
- Additions made so that users working in double buffered mode could explicitly swap buffers
Related Links
The Old TkOGL homepage
release notes
Sidney
Fels
Joel
Joyner
Claudio
Esperanca
Contact Information
Sidney Fels
Joel Joyner
Claudio Esperanca
|