File: overlay.tcl

package info (click to toggle)
mgltools-opengltk 1.5.7-1
  • links: PTS, VCS
  • area: non-free
  • in suites: stretch
  • size: 8,592 kB
  • ctags: 38,393
  • sloc: ansic: 98,617; python: 3,818; cpp: 1,943; sh: 1,332; tcl: 1,127; makefile: 65
file content (37 lines) | stat: -rw-r--r-- 1,046 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"

# $Id: overlay.tcl,v 1.2 2009/05/14 20:43:34 vareille Exp $

# Togl - a Tk OpenGL widget
# Copyright (C) 1996  Brian Paul and Ben Bederson
# Copyright (C) 2006-2007  Greg Couch
# See the LICENSE file for copyright details.


# A Tk/OpenGL widget demo using an overlay.

# add parent directory to path to find Togl's pkgIndex in current directory
if { [file exists pkgIndex.tcl] } {
    set auto_path [linsert $auto_path 0 ..]
}
# following load also loads Tk and Togl packages
load [file dirname [info script]]/overlay[info sharedlibextension]

proc setup {} {
    wm title . "Overlay demo"

    togl .win -width 200 -height 200 -rgba true -double false -overlay true -create create_cb -reshape reshape_cb -display display_cb -overlaydisplay overlay_display_cb
    button .btn -text Quit -command exit

    pack .win -expand true -fill both
    pack .btn -expand true -fill both
}


# Execution starts here!
# Execution starts here!
if { [info script] == $argv0 } {
	setup
}