setTimg.tcl
2.51 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#--------------------------- setTimg --------------------------------------------
set setTimgOptions {.setTimgFmtMB .setTimgSizeMB .setTimgwidthL .setTimgDoneB}
set setTimgEntries {.setTimgFmtE .setTimgSizeE .setTimgwidthE }
for {set i 0} {$i < [llength $setTimgOptions]} {incr i 1} {
frame .setTimgFrame$i
}
label .setTimgL -text "setTextureImg" -relief groove
menubutton .setTimgFmtMB -text "timgFmt" -width 10 -relief raised -menu .setTimgFmtMB.menu -bg LightGray -activebackground LightGray
menu .setTimgFmtMB.menu
.setTimgFmtMB.menu add radiobutton -label RGBA -command CsetTimgFmt -variable setTimgFmt -value 0
.setTimgFmtMB.menu add radiobutton -label YUV -command CsetTimgFmt -variable setTimgFmt -value 1
.setTimgFmtMB.menu add radiobutton -label CI -command CsetTimgFmt -variable setTimgFmt -value 2
.setTimgFmtMB.menu add radiobutton -label IA -command CsetTimgFmt -variable setTimgFmt -value 3
.setTimgFmtMB.menu add radiobutton -label I -command CsetTimgFmt -variable setTimgFmt -value 4
#set setTimgFmt 0
#set LsetTimgFmt RGBA
label .setTimgFmtE -width 9 -relief sunken -textvariable LsetTimgFmt
proc CsetTimgFmt {} {
global setTimgFmt
global LsetTimgFmt
switch $setTimgFmt {
0 {set LsetTimgFmt RGBA}
1 {set LsetTimgFmt YUV}
2 {set LsetTimgFmt CI}
3 {set LsetTimgFmt IA}
4 {set LsetTimgFmt I}
}
}
menubutton .setTimgSizeMB -text "timgSiz" -width 10 -relief raised -menu .setTimgSizeMB.menu -bg LightGray -activebackground LightGray
menu .setTimgSizeMB.menu
.setTimgSizeMB.menu add radiobutton -label 4 -command CsetTimgSize -variable setTimgSize -value 0
.setTimgSizeMB.menu add radiobutton -label 8 -command CsetTimgSize -variable setTimgSize -value 1
.setTimgSizeMB.menu add radiobutton -label 16 -command CsetTimgSize -variable setTimgSize -value 2
.setTimgSizeMB.menu add radiobutton -label 32 -command CsetTimgSize -variable setTimgSize -value 3
#set setTimgSize 2
#set LsetTimgSize 16
label .setTimgSizeE -width 9 -relief sunken -textvariable LsetTimgSize
proc CsetTimgSize {} {
global setTimgSize
global LsetTimgSize
switch $setTimgSize {
0 {set LsetTimgSize 4}
1 {set LsetTimgSize 8}
2 {set LsetTimgSize 16}
3 {set LsetTimgSize 32}
}
}
label .setTimgwidthL -width 10 -text "texWidth" -relief groove
entry .setTimgwidthE -width 9 -relief sunken -textvariable setTimgwidth
#set setTimgwidth 32
#Allow symbolic addresses?
label .setTimgDramAddrL -width 10 -text "dramAddr" -relief groove
entry .setTimgDramAddrE -width 9 -relief sunken -textvariable setTimgDramAddr
#set setTimgDramAddr 0