[Paul Obermeier] 2005/07/27 Tclogl offers the 3D functionality of OpenGL at the Tcl scripting level. Tclogl is an improved and enhanced OpenGL binding based on the work done with Frustum by Roger E Critchlow. [Paul Obermeier] 2006/01/15 TclOgl has been enhanced and renamed to [Tcl3D]. The new version Tcl3D 0.2 adds wrapping support for the following 3D related libraries: * OpenGL Version 2.0 * Lots of OpenGL extensions * NVidia's Cg shader library * SDL (Simple DirectMedia Library) * 4 gauge widgets * enhanced utility library More info and images can be found at http://www.tcl3d.org ---- [http://www.poSoft.de/images/teapots.png] [http://www.poSoft.de/images/texture_tclogl.png] ---- Tclogl uses SWIG and it’s extended typemap features to generate a consistent mapping between [OpenGL] C functions and equivalent Tcl commands without changing the OpenGL header files. Currently the OpenGL core functions defined in ''gl.h'' and the OpenGL utility functions defined in ''glu.h'' can be wrapped into a Tcl package. It has been tested on Windows, Linux and IRIX. It uses a slightly modified version of [Togl] to display the 3D contents. For a detailed description of the implementation and usage of tclogl, see the paper held at the [Fifth European Tcl/Tk Users Meeting]. The paper, sources (tclogl and modified Togl), demos (all OpenGL redbook C examples rewritten in Tcl), screenshots and binaries for Windows can be downloaded from my homepage at http://www.poSoft.de ---- [RT] notes, 13Jan2006, tclogl has been renamed to tcl3d and now lives at [http://www.tcl3d.org/]. I installed on win2000 and tried a number of demos successfully. One snag was that the main package require failed on my system due to missing dependent dlls for package require tcl3dcg package require tcl3dsdl Fixed by adding the catch wrappers around these two commands. Nice and pretty extensive package! [PO] 2006/01/15 If you do not have Cg and SDL installed, either use the patch above or use the Tcl3D-Lite distribution. I'm currently working on a better way of detecting the availability of dependent libraries. ---- A minimal "Hello, World" 3D application drawing a white rectangle looks like this: # hello.tcl package require tclogl package require Togl proc tclDisplayFunc { toglwin } { glClear GL_COLOR_BUFFER_BIT # draw white polygon (rectangle) with corners at # (0.25, 0.25, 0.0) and (0.75, 0.75, 0.0) glColor3f 1.0 1.0 1.0 glBegin GL_POLYGON glVertex3f 0.25 0.25 0.0 glVertex3f 0.75 0.25 0.0 glVertex3f 0.75 0.75 0.0 glVertex3f 0.25 0.75 0.0 glEnd glFlush } proc tclCreateFunc { toglwin } { # select clearing color glClearColor 0.0 0.0 0.0 0.0 # initialize viewing values glMatrixMode GL_PROJECTION glLoadIdentity glOrtho 0.0 1.0 0.0 1.0 -1.0 1.0 } proc tclReshapeFunc { toglwin w h } { $toglwin postredisplay } frame .fr pack .fr -expand 1 -fill both togl .fr.toglwin -width 250 -height 250 -double false \ -createproc tclCreateFunc \ -displayproc tclDisplayFunc \ -reshapeproc tclReshapeFunc grid .fr.toglwin -row 0 -column 0 -sticky news bind . "exit" ---- [[ [Category Graphics] | [Category 3D Graphics] ]]