Normand Briere
2019-05-05 1e3de699b037989e8deded5c7830139f97c64136
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()
....@@ -8077,12 +8075,16 @@
80778075 {
80788076 String texname = tex;
80798077
8080
- String[] split = tex.split("Textures");
8081
- if (split.length > 1)
8082
- texname = "/Users/nbriere/Textures" + split[split.length-1];
8083
- else
8084
- if (!texname.startsWith("/"))
8085
- 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
+ }
80868088
80878089 if (CACHETEXTURE)
80888090 texture = textures.get(texname); // TEXTURE CACHE
....@@ -9395,7 +9397,7 @@
93959397 //gl.glFlush();
93969398 gl.glAccum(gl.GL_ACCUM, 1.0f / ACSIZE);
93979399
9398
- if (ANIMATION && ABORTED)
9400
+ if (Globals.ANIMATION && ABORTED)
93999401 {
94009402 System.err.println(" ABORTED FRAME");
94019403 break;
....@@ -9425,7 +9427,7 @@
94259427 setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
94269428
94279429 // save image
9428
- if (ANIMATION && !ABORTED)
9430
+ if (Globals.ANIMATION && !ABORTED)
94299431 {
94309432 VPwidth = viewport[2];
94319433 VPheight = viewport[3];
....@@ -9536,7 +9538,7 @@
95369538
95379539 // imagecount++;
95389540
9539
- 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;
95409542
95419543 if (!BOXMODE)
95429544 {
....@@ -11260,8 +11262,14 @@
1126011262 {
1126111263 renderpass++;
1126211264 // System.out.println("Draw object... ");
11265
+ STEP = 1;
1126311266 if (FAST) // in case there is no script
11264
- STEP = 16;
11267
+ STEP = 8;
11268
+
11269
+ if (CURRENTANTIALIAS == 0 || ACSIZE == 1)
11270
+ {
11271
+ STEP *= 4;
11272
+ }
1126511273
1126611274 //object.FullInvariants();
1126711275
....@@ -12599,8 +12607,10 @@
1259912607 "MAX ndotl.x, ndotl.x, -ndotl.x;" +
1260012608
1260112609 "SUB temp.x, one.x, ndotl.x;" +
12602
- "ADD temp.x, temp.x, options2.z;" + // lightsheen
12603
- "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
1260412614 "MUL temp.x, temp.x, temp.y;" +
1260512615
1260612616 "MUL saturation, saturation, temp.xxxx;" +
....@@ -12748,7 +12758,7 @@
1274812758 "MUL final.y, fragment.texcoord[0].x, c256;" +
1274912759 "FLR final.x, final.y;" +
1275012760 "SUB final.y, final.y, final.x;" +
12751
- //"MUL final.x, final.x, c256i;" +
12761
+ "MUL final.x, final.x, c256i;" +
1275212762 "MOV final.z, zero.x;" +
1275312763 "MOV final.a, one.w;":""
1275412764 ) +
....@@ -12756,7 +12766,7 @@
1275612766 "MUL final.y, fragment.texcoord[0].y, c256;" +
1275712767 "FLR final.x, final.y;" +
1275812768 "SUB final.y, final.y, final.x;" +
12759
- //"MUL final.x, final.x, c256i;" +
12769
+ "MUL final.x, final.x, c256i;" +
1276012770 "MOV final.z, zero.x;" +
1276112771 "MOV final.a, one.w;":""
1276212772 ) +
....@@ -14479,7 +14489,7 @@
1447914489 }
1448014490
1448114491 boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK);
14482
- if (capsLocked || (modifiers & META) == META)
14492
+ if (capsLocked) // || (modifiers & META) == META)
1448314493 {
1448414494 mouseMode |= VR; // BACKFORTH;
1448514495 }
....@@ -15116,7 +15126,7 @@
1511615126 {
1511715127 //System.out.println("processMouseMotionEvent: " + mouseMode + " " + e.getModifiers() + " " + e.getModifiersEx() + " " + e.getButton());
1511815128 //if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0)
15119
- if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (mouseMode & SELECT) == 0)
15129
+ if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (e.getModifiers() & MouseEvent.BUTTON3_MASK) == 0 && (mouseMode & SELECT) == 0)
1512015130 {
1512115131 mouseMoved(e);
1512215132 } else