Normand Briere
2019-05-05 d7bc8865056ea0d35df261e719f92e1422af7c6e
CameraPane.java
....@@ -56,8 +56,6 @@
5656 static int CURRENTANTIALIAS = 0; // 1;
5757 /*static*/ boolean RENDERSHADOW = true;
5858 /*static*/ int RENDERPROGRAM = 2; // 0 == none, 1 == fast, 2 == normal
59
- static boolean ANIMATION = false;
60
- static String filename;
6159
6260 boolean DISPLAYTEXT = false;
6361 //boolean REDUCETEXTURE = true;
....@@ -86,7 +84,7 @@
8684 static boolean FULLSCREEN = false;
8785 static boolean SUPPORT = true;
8886 static boolean INERTIA = true;
89
-static boolean FAST = true; // false;
87
+static boolean FAST = false;
9088 static boolean SLOWPOSE = false;
9189 static boolean FOOTCONTACT = true;
9290
....@@ -108,7 +106,7 @@
108106 static boolean OEIL = true;
109107 static boolean OEILONCE = false; // do oeilon then oeiloff
110108 static boolean LOOKAT = true;
111
-static boolean RANDOM = true; // false;
109
+static boolean SWITCH = true; // false;
112110 static boolean HANDLES = false; // selection doesn't work!!
113111 static boolean PAINTMODE = false;
114112
....@@ -2269,7 +2267,7 @@
22692267
22702268 void ToggleRandom()
22712269 {
2272
- RANDOM ^= true;
2270
+ SWITCH ^= true;
22732271 }
22742272
22752273 void ToggleHandles()
....@@ -4208,6 +4206,7 @@
42084206
42094207 com.sun.opengl.util.texture.Texture CompressTexture2(String name)
42104208 {
4209
+ new Exception().printStackTrace();
42114210 System.exit(0);
42124211 com.sun.opengl.util.texture.Texture texture = null;
42134212
....@@ -8076,12 +8075,16 @@
80768075 {
80778076 String texname = tex;
80788077
8079
- String[] split = tex.split("Textures");
8080
- if (split.length > 1)
8081
- texname = "/Users/nbriere/Textures" + split[split.length-1];
8082
- else
8083
- if (!texname.startsWith("/"))
8084
- texname = "/Users/nbriere/Textures/" + texname;
8078
+// String[] split = tex.split("Textures");
8079
+// if (split.length > 1)
8080
+// texname = "/Users/nbriere/Textures" + split[split.length-1];
8081
+// else
8082
+// if (!texname.startsWith("/"))
8083
+// texname = "/Users/nbriere/Textures/" + texname;
8084
+ if (!new File(tex).exists())
8085
+ {
8086
+ texname = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory() + "/Textures/" + texname;
8087
+ }
80858088
80868089 if (CACHETEXTURE)
80878090 texture = textures.get(texname); // TEXTURE CACHE
....@@ -9394,7 +9397,7 @@
93949397 //gl.glFlush();
93959398 gl.glAccum(gl.GL_ACCUM, 1.0f / ACSIZE);
93969399
9397
- if (ANIMATION && ABORTED)
9400
+ if (Globals.ANIMATION && ABORTED)
93989401 {
93999402 System.err.println(" ABORTED FRAME");
94009403 break;
....@@ -9424,7 +9427,7 @@
94249427 setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
94259428
94269429 // save image
9427
- if (ANIMATION && !ABORTED)
9430
+ if (Globals.ANIMATION && !ABORTED)
94289431 {
94299432 VPwidth = viewport[2];
94309433 VPheight = viewport[3];
....@@ -9535,7 +9538,7 @@
95359538
95369539 // imagecount++;
95379540
9538
- String fullname = filename + (i%100000)/10000 + "" + (i%10000)/1000 + "" + (i%1000)/100 + "" + (i%100)/10 + "" + (i%10) + "." + ext;
9541
+ String fullname = Globals.filename + (i%100000)/10000 + "" + (i%10000)/1000 + "" + (i%1000)/100 + "" + (i%100)/10 + "" + (i%10) + "." + ext;
95399542
95409543 if (!BOXMODE)
95419544 {
....@@ -11259,8 +11262,14 @@
1125911262 {
1126011263 renderpass++;
1126111264 // System.out.println("Draw object... ");
11265
+ STEP = 1;
1126211266 if (FAST) // in case there is no script
11263
- STEP = 16;
11267
+ STEP = 8;
11268
+
11269
+ if (CURRENTANTIALIAS == 0 || ACSIZE == 1)
11270
+ {
11271
+ STEP *= 4;
11272
+ }
1126411273
1126511274 //object.FullInvariants();
1126611275
....@@ -12598,8 +12607,10 @@
1259812607 "MAX ndotl.x, ndotl.x, -ndotl.x;" +
1259912608
1260012609 "SUB temp.x, one.x, ndotl.x;" +
12601
- "ADD temp.x, temp.x, options2.z;" + // lightsheen
12602
- "ADD temp.y, one.y, options2.y;" + // sursurface
12610
+ // Tuning for default skin
12611
+ //"ADD temp.x, temp.x, options2.z;" + // lightsheen
12612
+ "MAD temp.x, options2.z, half.y, temp.x;" + // lightsheen
12613
+ "ADD temp.y, one.y, options2.y;" + // subsurface
1260312614 "MUL temp.x, temp.x, temp.y;" +
1260412615
1260512616 "MUL saturation, saturation, temp.xxxx;" +
....@@ -12747,7 +12758,7 @@
1274712758 "MUL final.y, fragment.texcoord[0].x, c256;" +
1274812759 "FLR final.x, final.y;" +
1274912760 "SUB final.y, final.y, final.x;" +
12750
- "MUL final.x, final.x, c256i;" +
12761
+ //"MUL final.x, final.x, c256i;" +
1275112762 "MOV final.z, zero.x;" +
1275212763 "MOV final.a, one.w;":""
1275312764 ) +
....@@ -12755,7 +12766,7 @@
1275512766 "MUL final.y, fragment.texcoord[0].y, c256;" +
1275612767 "FLR final.x, final.y;" +
1275712768 "SUB final.y, final.y, final.x;" +
12758
- "MUL final.x, final.x, c256i;" +
12769
+ //"MUL final.x, final.x, c256i;" +
1275912770 "MOV final.z, zero.x;" +
1276012771 "MOV final.a, one.w;":""
1276112772 ) +
....@@ -13946,6 +13957,7 @@
1394613957
1394713958 public void run()
1394813959 {
13960
+ new Exception().printStackTrace();
1394913961 System.exit(0);
1395013962 for (;;)
1395113963 {
....@@ -15144,6 +15156,7 @@
1514415156
1514515157 void SelectParent()
1514615158 {
15159
+ new Exception().printStackTrace();
1514715160 System.exit(0);
1514815161 Composite group = (Composite) object;
1514915162 java.util.Vector selectees = new java.util.Vector(group.selection);
....@@ -15167,6 +15180,7 @@
1516715180
1516815181 void SelectChildren()
1516915182 {
15183
+ new Exception().printStackTrace();
1517015184 System.exit(0);
1517115185 /*
1517215186 Composite group = (Composite) object;
....@@ -16280,6 +16294,7 @@
1628016294 {
1628116295 if (!selection)
1628216296 {
16297
+ new Exception().printStackTrace();
1628316298 System.exit(0);
1628416299 return;
1628516300 }