Documentation
Structure Overview
TkOGL consists of three packages, TkOGL, OpenGL, and OpenGLU. The TkOGL package contains the window manager who's responsible for creating and destroying windows, refreshing, initializing viewports, and handling events. It manages the canvas where all OpenGL graphics are drawn. In creating OpenGL and OpenGLU packages, SWIG is used to generate wrapper code from the OpenGL header files. An HTML or Word document is generated by SWIG that summarizes the functions and its parameters. The generated wrapper code is compiled to create dynamic link libraries (Windows), or shared libraries (Linux). The libraries are seen as Tcl packages through the Tcl interpreter.
After these packages are installed into the Tcl library, the user can manually load each individual package into the Tcl Interpreter. With all the OpenGL commands available, along with the new TkOGL window manager commands, users can now quickly script up interactive 3D graphical applications.

TkOGL Development Process
Getting Started
TkOGL Users
TkOGL Developers
To re-compile TkOGL in Windows
To re-compile TkOGL in Linux
Note: These are simplified installation procedures. More detailed installation notes are available in the downloaded files
Tutorial
This is a simple TkOGL example that illustrates the process and the syntax involved in creating a simple image on the canvas. It performs the following operations.
Code:
Run wish from Windows or Linux and type the following at the command prompt. Most developers would write this in a script file with file extension ".tcl". This file is platform independent and can be ran on both Windows and Linux.
package require Tkogl
package require OpenGL
package require OpenGLU
proc draw {} {
glClear GL_COLOR_BUFFER_BIT
glColor3f 1 0 0.5
glBegin GL_TRIANGLES
glVertex3f 0.1 0.7 0.1
glVertex3f -0.7 -0.7 0.1
glVertex3f 0.7 -0.7 0.1
glEnd
}
pack [OGLwin .gl -refresh draw]
Output:

White Papers
| Title | Authors |
| TkOGL - Integrating Tcl and Open GL | Joel Joyner |
| A Tk OpenGL Widget | Claudio Esperanca |
| EasyOgl: Fast Prototyping Environment for 3D Multimedia Integration using Tcl/Tk and OpenGL | Sidney Fels and Matt Yedlin |
Reference Material
| TkOGL Programming Reference | Authors |
| TkOGL GL Commands | GL Commands available in TkOGL. Reference document generated by SWIG |
| TkOGL GLU Commands | GLU Commands available in TkOGL. Reference document generated by SWIG |
| Books | Authors |
| "OpenGL SuperBible Second Edition" | Richard S Wright Jr. and Michael Sweet |
| "Interactive Computer Graphics: A Top-Down Approach with OpenGL" | Edward Angel |
| "Graphical Applications with Tcl & TK" | Eric Foster-Johnson |
| "Tcl and the Tk Toolkit" | John K. Ousterhout |
| Online | Description |
| http://www.cevis.uni-bremen.de/~uwe/opengl/opengl.html | OpenGL reference page |
| http://www.tcl.tk/man/tcl8.4/ | Tcl/Tk reference page |
Home | News | Download | Documentation | Multimedia | Related Links | Contact Info