TKOGL DEMO SCRIPTS ================== Running a Demo Script on Unix-based systems: Just execute your TKOGL extended wish (glwish) with the script as a parameter. For example, if you have just compiled glwish in the 'src' directory, you should be able to run, say, nurbsdemo.tcl with ../src/mesawish nurbsdemo.tcl Running a Demo Script in Windows 95 or Windows-NT: The best way to run a Tcl script in Windows 95 is to double-click the tcl file from within the Explorer. If you have not yet associated the .tcl filetype with wish41, this might be a good time to do it -- when the explorer pops up a dialog box asking you which application should be used to open the file, choose wish41 and check the "Always use this program to open this file". If you do not wish to do this, you can always use the "Run" entry in the "Start" menu: Assuming that the Tcl/Tk distribution was installed in "C:\Tcl" and that the demo directory is in c:\tkogl\demo, you should use the following command line to run nurbsdemo.tcl: c:\tcl\bin\wish41.exe c:\tkogl\demo\nurbsdemo.tcl Notes about the demos: accumdemo.tcl Shows the use of the accumulation buffer to blend two spheres bezcurvedemo.tcl Renders a cubic Bezier curve. Control points can be dragged with mouse button 1 bezsurfdemo.tcl Renders a cubic Bezier surface patch. Dragging Button 1 rotates the surface. Clicking Button 2 toggles between line display and fill display. fogdemo.tcl Renders three colored spheres with fog. The radio buttons and scales control some of the OpenGL fog rendering parameters. gencyldemo.tcl Demonstrates some of the capabilities of the Generic Cylinder extension. The radio buttons select different surface types. The edit check button opens a popup window for inspecting or changing the parameters of the surface type currently selected. Mouse button 1 can be used to rotate the surface. nurbsdemo.tcl Demonstrates some uses of the nurbssurface command. Renders a surface patch defined by a 4x4 control point mesh. The radio buttons let you experiment with parameters such as the knot distributions, the polynomial order, etc. Dragging mouse button 1 rotates the surface. pickdemo.tcl Demonstrates the select widget command by allowing picking and dragging the vertices of a wireframe with mouse button 2. Dragging button 1 performs rotation. quadricdemo.tcl Demonstrates how to use the various options of the cylinder, sphere, disk and partialdisk widget commands. Dragging button 1 rotates the model. polydemo.tcl Draws the 5 platonic polyhedra and variations thereof. Also demonstrates how to use the stencil buffer to draw wireframes over filled polygons. simpledemo.tcl A very simple application - draws a triangle. Beginners should start by browsing this source. tessdemo.tcl Demonstrates the use of the tesselate widget command. Draws a square with a square hole. Button 1 toggles between line and fill modes. texturedemo.tcl Demonstrates OpenGL texture mapping. Two textures can be selected by radio buttons: a checkerboard image generated by the script itself and the teapot image (teapot.ppm) of the Tcl/Tk distribution.