can't find package tcl3d 0.2
    while executing
"package require tcl3d 0.2"
    (in namespace eval "::request" script line 15)
    invoked from within
"namespace eval ::request $script"
    ("::try" body line 12)

OUTPUT BUFFER:

# tcl3dDouble.tcl # # A Tcl3D widget demo with two windows, one single buffered and the # other double buffered. # # This is a version of the original Togl double demo written entirely in Tcl # with the help of the Tcl3D package. # # Copyright (C) 1996 Brian Paul and Ben Bederson (Original C/Tcl version) # Copyright (C) 2005 Paul Obermeier (Tcl3D version) # See the LICENSE file for copyright details. # # Original sources available at: http://sourceforge.net/projects/togl/ package require tcl3d 0.2 proc bgerror { msg } { tk_messageBox -icon error -type ok -message "Error: $msg" exit } proc tclCreateFunc { toglwin } { set ::FontBase [$toglwin loadbitmapfont "fixed"] puts "fontbase $::FontBase" } proc tclReshapeFunc { toglwin w h } { set aspect [expr double ($w) / double ($h)] glViewport 0 0 $w $h glMatrixMode GL_PROJECTION glLoadIdentity glFrustum [expr -1.0 * $aspect] $aspect -1.0 1.0 1.0 10.0 set ::CornerX [expr -1.0 * $aspect] set ::CornerY -1.0 set ::CornerZ -1.1 glMatrixMode GL_MODELVIEW } proc print_string {s} { glListBase $::FontBase set len [string length $s] set sa [tcl3dVectorFromString GLubyte $s] glCallLists $len GL_UNSIGNED_BYTE $sa $sa delete } proc tclDisplayFunc { toglwin } { global FontBase glClear [expr $::GL_COLOR_BUFFER_BIT | $::GL_DEPTH_BUFFER_BIT] glLoadIdentity glTranslatef 0.0 0.0 -3.0 glRotatef $::xAngle 1.0 0.0 0.0 glRotatef $::yAngle 0.0 1.0 0.0 glRotatef $::zAngle 0.0 0.0 1.0 glEnable GL_DEPTH_TEST if { ! [info exists ::cubeList] } { set ::cubeList [glGenLists 1] glNewList $::cubeList GL_COMPILE glBegin GL_QUADS glColor3f 0.0 0.7 0.1 glVertex3f -1.0 1.0 1.0 glVertex3f 1.0 1.0 1.0 glVertex3f 1.0 -1.0 1.0 glVertex3f -1.0 -1.0 1.0 glColor3f 0.9 1.0 0.0 glVertex3f -1.0 1.0 -1.0 glVertex3f 1.0 1.0 -1.0 glVertex3f 1.0 -1.0 -1.0 glVertex3f -1.0 -1.0 -1.0 glColor3f 0.2 0.2 1.0 glVertex3f -1.0 1.0 1.0 glVertex3f 1.0 1.0 1.0 glVertex3f 1.0 1.0 -1.0 glVertex3f -1.0 1.0 -1.0 glColor3f 0.7 0.0 0.1 glVertex3f -1.0 -1.0 1.0 glVertex3f 1.0 -1.0 1.0 glVertex3f 1.0 -1.0 -1.0 glVertex3f -1.0 -1.0 -1.0 glEnd glEndList } glCallList $::cubeList puts "x= $::CornerX y=$::CornerY z=$::CornerZ" glDisable GL_DEPTH_TEST glLoadIdentity glColor3f 0.0 1.0 0.0 glRasterPos3f $::CornerX $::CornerY $::CornerZ set ident [lindex [$toglwin configure -ident] end] if { [string compare $ident "Single"] == 0 } { print_string "Single buffered" } else { print_string "Double buffered" } $toglwin swapbuffers } proc setXrot { wid val } { set ::xAngle $val if { $::xAngle < 0.0 } { set ::xAngle [expr $::xAngle + 360.0] } elseif { $::xAngle > 360.0 } { set ::xAngle [expr $::xAngle - 360.0] } $wid postredisplay } proc setYrot { wid val } { set ::yAngle $val if { $::yAngle < 0.0 } { set ::yAngle [expr $::yAngle + 360.0] } elseif { $::yAngle > 360.0 } { set ::yAngle [expr $::yAngle - 360.0] } $wid postredisplay } proc setup {} { wm title . "Tcl3D demo: Single vs Double Buffering" # Master frame. Needed to integrate demo into Tcl3D Starpack presentation. frame .fr pack .fr -expand 1 -fill both frame .fr.f1 # create first Togl widget togl .fr.f1.o1 -width 200 -height 200 -rgba true \ -double false -depth true -ident Single \ -createproc tclCreateFunc \ -displayproc tclDisplayFunc \ -reshapeproc tclReshapeFunc # create second Togl widget, share display lists with first widget togl .fr.f1.o2 -width 200 -height 200 -rgba true \ -double true -depth true -ident Double -sharelist Single \ -createproc tclCreateFunc \ -displayproc tclDisplayFunc \ -reshapeproc tclReshapeFunc scale .fr.sx -label {X Axis} -from 0 -to 360 -command {setAngle x} \ -orient horizontal scale .fr.sy -label {Y Axis} -from 0 -to 360 -command {setAngle y} \ -orient horizontal button .fr.btn -text Quit -command exit bind .fr.f1.o1 { motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } bind .fr.f1.o2 { motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } bind . "exit" pack .fr.f1.o1 -side left -padx 3 -pady 3 -fill both -expand t pack .fr.f1.o2 -side left -padx 3 -pady 3 -fill both -expand t pack .fr.f1 -fill both -expand 1 pack .fr.sx -fill x pack .fr.sy -fill x pack .fr.btn -fill x } # This is called when mouse button 1 is pressed and moved in either of # the OpenGL windows. proc motion_event { width height x y } { setXrot .fr.f1.o1 [expr 360.0 * $y / $height] setXrot .fr.f1.o2 [expr 360.0 * $y / $height] setYrot .fr.f1.o1 [expr 360.0 * ($width - $x) / $width] setYrot .fr.f1.o2 [expr 360.0 * ($width - $x) / $width] .fr.sx set $::xAngle .fr.sy set $::yAngle } # This is called when a slider is changed. proc setAngle {axis value} { global xAngle yAngle zAngle switch -exact $axis { x {setXrot .fr.f1.o1 $value setXrot .fr.f1.o2 $value } y {setYrot .fr.f1.o1 $value setYrot .fr.f1.o2 $value } } } set xAngle 0.0 set yAngle 0.0 set zAngle 0.0 setup