Normand Briere
2019-06-09 79d0f9a45d36656051a77a7b0837aa0318f81ee5
CameraPane.java
....@@ -106,7 +106,7 @@
106106 static boolean OEIL = true;
107107 static boolean OEILONCE = false; // do oeilon then oeiloff
108108 static boolean LOOKAT = true;
109
-static boolean RANDOM = true; // false;
109
+static boolean SWITCH = true; // false;
110110 static boolean HANDLES = false; // selection doesn't work!!
111111 static boolean PAINTMODE = false;
112112
....@@ -1628,7 +1628,7 @@
16281628
16291629 cColor.HSBtoRGB(display.color, display.saturation, 1, display.modelParams0);
16301630
1631
- float[] colorV = GrafreeD.colorV;
1631
+ float[] colorV = Grafreed.colorV;
16321632
16331633 /**/
16341634 if (display.DrawMode() == display.DEFAULT) // && display.RENDERPROGRAM == 0)
....@@ -2140,7 +2140,7 @@
21402140 System.err.println("LIVE = " + Globals.isLIVE());
21412141
21422142 if (!Globals.isLIVE()) // save sound
2143
- GrafreeD.savesound = true; // wav.save();
2143
+ Grafreed.savesound = true; // wav.save();
21442144 // else
21452145 repaint(); // start loop // may 2013
21462146 }
....@@ -2267,7 +2267,7 @@
22672267
22682268 void ToggleRandom()
22692269 {
2270
- RANDOM ^= true;
2270
+ SWITCH ^= true;
22712271 }
22722272
22732273 void ToggleHandles()
....@@ -8022,7 +8022,7 @@
80228022 }
80238023 }
80248024
8025
- /*boolean*/ public void BindTextures(cTexture tex, int resolution) // INTERFACE
8025
+ /*boolean*/ public void BindTextures(cTexture tex, int resolution) throws Exception // INTERFACE
80268026 {
80278027 if (// DrawMode() != 0 || /*tex == null ||*/
80288028 ambientOcclusion ) // || !textureon)
....@@ -8067,7 +8067,7 @@
80678067 return; // true;
80688068 }
80698069
8070
- CacheTexture GetCacheTexture(String tex, boolean bump, int resolution)
8070
+ CacheTexture GetCacheTexture(String tex, boolean bump, int resolution) throws Exception
80718071 {
80728072 CacheTexture/*com.sun.opengl.util.texture.Texture*/ texture = null;
80738073
....@@ -8075,12 +8075,16 @@
80758075 {
80768076 String texname = tex;
80778077
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;
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
+ }
80848088
80858089 if (CACHETEXTURE)
80868090 texture = textures.get(texname); // TEXTURE CACHE
....@@ -8180,7 +8184,9 @@
81808184 texturedata = GetFileTexture(cachename, processbump, resolution);
81818185
81828186
8183
- if (texturedata != null)
8187
+ if (texturedata == null)
8188
+ throw new Exception();
8189
+
81848190 texture = new CacheTexture(com.sun.opengl.util.texture.TextureIO.newTexture(texturedata),resolution);
81858191 //texture = GetTexture(tex, bump);
81868192 }
....@@ -8302,7 +8308,7 @@
83028308 return texture;
83038309 }
83048310
8305
- com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution)
8311
+ com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution) throws Exception
83068312 {
83078313 CacheTexture texture = GetCacheTexture(tex, bump, resolution);
83088314
....@@ -8320,14 +8326,14 @@
83208326 return texture!=null?texture.texture:null;
83218327 }
83228328
8323
- public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution)
8329
+ public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution) throws Exception
83248330 {
83258331 CacheTexture texture = GetCacheTexture(tex, bump, resolution);
83268332
83278333 return texture!=null?texture.texturedata:null;
83288334 }
83298335
8330
- boolean BindTexture(String tex, boolean bump, int resolution)
8336
+ boolean BindTexture(String tex, boolean bump, int resolution) throws Exception
83318337 {
83328338 if (/*tex == null ||*/ ambientOcclusion ) // || !textureon)
83338339 {
....@@ -9538,7 +9544,7 @@
95389544
95399545 if (!BOXMODE)
95409546 {
9541
- System.out.println("image: " + fullname + " (wav cursor=" + (GrafreeD.wav.cursor / 735 / 4) + ")");
9547
+ System.out.println("image: " + fullname + " (wav cursor=" + (Grafreed.wav.cursor / 735 / 4) + ")");
95429548 }
95439549
95449550 if (!BOXMODE)
....@@ -9576,7 +9582,7 @@
95769582 ABORTED = false;
95779583 }
95789584 else
9579
- GrafreeD.wav.cursor += 735 * ACSIZE;
9585
+ Grafreed.wav.cursor += 735 * ACSIZE;
95809586
95819587 if (false)
95829588 {
....@@ -10239,11 +10245,11 @@
1023910245
1024010246 public void display(GLAutoDrawable drawable)
1024110247 {
10242
- if (GrafreeD.savesound && GrafreeD.hassound)
10248
+ if (Grafreed.savesound && Grafreed.hassound)
1024310249 {
10244
- GrafreeD.wav.save();
10245
- GrafreeD.savesound = false;
10246
- GrafreeD.hassound = false;
10250
+ Grafreed.wav.save();
10251
+ Grafreed.savesound = false;
10252
+ Grafreed.hassound = false;
1024710253 }
1024810254 // if (DEBUG_SELECTION)
1024910255 // {
....@@ -10373,7 +10379,7 @@
1037310379 Object3D theobject = object;
1037410380 Object3D theparent = object.parent;
1037510381 object.parent = null;
10376
- object = (Object3D)GrafreeD.clone(object);
10382
+ object = (Object3D)Grafreed.clone(object);
1037710383 object.Stripify();
1037810384 if (theobject.selection == null || theobject.selection.Size() == 0)
1037910385 theobject.PreprocessOcclusion(this);
....@@ -10794,7 +10800,16 @@
1079410800 // Bump noise
1079510801 gl.glActiveTexture(GL.GL_TEXTURE6);
1079610802 //gl.glBindTexture(GL.GL_TEXTURE_2D, bump_noise);
10797
- BindTexture(NOISE_TEXTURE, false, 2);
10803
+
10804
+ try
10805
+ {
10806
+ BindTexture(NOISE_TEXTURE, false, 2);
10807
+ }
10808
+ catch (Exception e)
10809
+ {
10810
+ System.err.println("FAILED: " + NOISE_TEXTURE);
10811
+ }
10812
+
1079810813
1079910814 gl.glActiveTexture(GL.GL_TEXTURE0);
1080010815 gl.glEnable(GL.GL_TEXTURE_2D);
....@@ -11279,8 +11294,8 @@
1127911294 e.printStackTrace();
1128011295 }
1128111296
11282
- if (GrafreeD.RENDERME > 0)
11283
- GrafreeD.RENDERME--; // mechante magouille
11297
+ if (Grafreed.RENDERME > 0)
11298
+ Grafreed.RENDERME--; // mechante magouille
1128411299
1128511300 Globals.ONESTEP = false;
1128611301 }
....@@ -11350,7 +11365,14 @@
1135011365
1135111366 usedtextures.clear();
1135211367
11353
- BindTextures(DEFAULT_TEXTURES, 2);
11368
+ try
11369
+ {
11370
+ BindTextures(DEFAULT_TEXTURES, 2);
11371
+ }
11372
+ catch (Exception e)
11373
+ {
11374
+ System.err.println("FAILED: " + DEFAULT_TEXTURES);
11375
+ }
1135411376 }
1135511377 //System.out.println("--> " + stackdepth);
1135611378 // GrafreeD.traceon();
....@@ -11441,7 +11463,14 @@
1144111463 if (checker != null && DrawMode() == DEFAULT)
1144211464 {
1144311465 //BindTexture(IMMORTAL_TEXTURE);
11444
- BindTextures(checker.GetTextures(), checker.texres);
11466
+ try
11467
+ {
11468
+ BindTextures(checker.GetTextures(), checker.texres);
11469
+ }
11470
+ catch (Exception e)
11471
+ {
11472
+ System.err.println("FAILED: " + checker.GetTextures());
11473
+ }
1144511474 // NEAREST
1144611475 GetGL().glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); // GL.GL_LINEAR);
1144711476 DrawChecker(gl);
....@@ -12473,8 +12502,8 @@
1247312502
1247412503 // display shadow only (bump == 0)
1247512504 "SUB temp.x, half.x, shadow.x;" +
12476
- "MOV temp.y, -params6.x;" +
12477
- "SLT temp.z, temp.y, zero.x;" +
12505
+ "MOV temp.y, -params5.z;" + // params6.x;" +
12506
+ "SLT temp.z, temp.y, -one2048th.x;" +
1247812507 "SUB temp.y, one.x, temp.z;" +
1247912508 "MUL temp.x, temp.x, temp.y;" +
1248012509 "KIL temp.x;" +
....@@ -12754,7 +12783,7 @@
1275412783 "MUL final.y, fragment.texcoord[0].x, c256;" +
1275512784 "FLR final.x, final.y;" +
1275612785 "SUB final.y, final.y, final.x;" +
12757
- //"MUL final.x, final.x, c256i;" +
12786
+ "MUL final.x, final.x, c256i;" +
1275812787 "MOV final.z, zero.x;" +
1275912788 "MOV final.a, one.w;":""
1276012789 ) +
....@@ -12762,7 +12791,7 @@
1276212791 "MUL final.y, fragment.texcoord[0].y, c256;" +
1276312792 "FLR final.x, final.y;" +
1276412793 "SUB final.y, final.y, final.x;" +
12765
- //"MUL final.x, final.x, c256i;" +
12794
+ "MUL final.x, final.x, c256i;" +
1276612795 "MOV final.z, zero.x;" +
1276712796 "MOV final.a, one.w;":""
1276812797 ) +
....@@ -12805,7 +12834,7 @@
1280512834 //once = true;
1280612835 }
1280712836
12808
- System.out.print("Program #" + mode + "; length = " + program.length());
12837
+ System.out.print("Program #" + mode + "; instructions = " + program.split(";").length + "; length = " + program.length());
1280912838 System.out.println(" - " + (mode >> 3) + " lights; " + ((mode & 2) == 2 ? "anisoUV " : "") + ((mode & 4) == 4 ? "SoftShadow " : ""));
1281012839 loadProgram(gl, GL.GL_FRAGMENT_PROGRAM_ARB, program);
1281112840
....@@ -12938,12 +12967,16 @@
1293812967
1293912968 "ADD " + depth + ".z, " + depth + ".z, temp.x;" +
1294012969 //"SUB " + depth + ".z, " + depth + ".z, temp.x;" + // back face shadowing!
12970
+
12971
+ // Compare fragment depth in light space with shadowmap.
1294112972 "SUB temp.x, fragment.texcoord[1].z, " + depth + ".z;" +
1294212973 "SGE temp.y, temp.x, zero.x;" +
12943
- "SUB " + shadow + ".y, one.x, temp.y;" +
12974
+ "SUB " + shadow + ".y, one.x, temp.y;" + // Specular is fully occluded
12975
+
12976
+ // Reverse comparison
1294412977 "SUB temp.x, one.x, temp.x;" +
1294512978 "MUL " + shadow + ".x, temp.x, temp.y;" +
12946
- "SUB " + shadow + ".x, one.x, " + shadow + ".x;" + // specular is fully occluded
12979
+ "SUB " + shadow + ".x, one.x, " + shadow + ".x;" + // diffuse
1294712980 "POW " + shadow + ".x, " + shadow + ".x, params5.z;" + // fake depth
1294812981
1294912982 "SLT " + shadow + ".z, fragment.texcoord[1].z, " + depth + ".z;" +
....@@ -12957,6 +12990,10 @@
1295712990 // No shadow for backface
1295812991 "DP3 temp.x, normal, lightd;" +
1295912992 "SLT temp.x, temp.x, zero.x;" + // shadoweps
12993
+ "LRP " + shadow + ", temp.x, one, " + shadow + ";" +
12994
+
12995
+ // No shadow when out of frustrum
12996
+ "SGE temp.x, " + depth + ".z, one.z;" +
1296012997 "LRP " + shadow + ", temp.x, one, " + shadow + ";" +
1296112998 "";
1296212999 }
....@@ -13515,7 +13552,7 @@
1351513552 public void mousePressed(MouseEvent e)
1351613553 {
1351713554 //System.out.println("mousePressed: " + e);
13518
- clickStart(e.getX(), e.getY(), e.getModifiersEx());
13555
+ clickStart(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx());
1351913556 }
1352013557
1352113558 static long prevtime = 0;
....@@ -13591,8 +13628,8 @@
1359113628 // mode |= META;
1359213629 //}
1359313630
13594
- SetMouseMode(WHEEL | e.getModifiersEx());
13595
- drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0);
13631
+ SetMouseMode(e.getModifiers(), WHEEL | e.getModifiersEx());
13632
+ drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0, 0);
1359613633 anchorX = ax;
1359713634 anchorY = ay;
1359813635 prevX = px;
....@@ -13652,6 +13689,10 @@
1365213689 // wasliveok = true;
1365313690 // waslive = false;
1365413691
13692
+ // May 2019 Forget it:
13693
+ if (true)
13694
+ return;
13695
+
1365513696 // source == timer
1365613697 if (mouseDown)
1365713698 {
....@@ -13690,7 +13731,7 @@
1369013731
1369113732 javax.swing.Timer timer = new javax.swing.Timer(350, this);
1369213733
13693
- void clickStart(int x, int y, int modifiers)
13734
+ void clickStart(int x, int y, int modifiers, int modifiersex)
1369413735 {
1369513736 if (!wasliveok)
1369613737 return;
....@@ -13707,7 +13748,7 @@
1370713748 // touched = true; // main DL
1370813749 if (isRenderer)
1370913750 {
13710
- SetMouseMode(modifiers);
13751
+ SetMouseMode(modifiers, modifiersex);
1371113752 }
1371213753
1371313754 selectX = anchorX = x;
....@@ -13720,7 +13761,7 @@
1372013761 clicked = true;
1372113762 hold = false;
1372213763
13723
- if (((modifiers & ~1024) & ~0) == 0) // Single or multiple selection
13764
+ if (((modifiersex & ~1024) & ~0) == 0) // Single or multiple selection
1372413765 // june 2013 means CTRL_CLICK: if (((modifiers & ~1024) & ~128) == 0) // Single or multiple selection
1372513766 {
1372613767 // System.out.println("RESTART II " + modifiers);
....@@ -13751,7 +13792,7 @@
1375113792 info.camera = renderCamera;
1375213793 info.x = x;
1375313794 info.y = y;
13754
- info.modifiers = modifiers;
13795
+ info.modifiers = modifiersex;
1375513796 editObj = object.doEditClick(info, 0);
1375613797 if (!editObj)
1375713798 {
....@@ -13780,7 +13821,7 @@
1378013821 clickEnd(e.getX(), e.getY(), e.getModifiersEx());
1378113822 }
1378213823 else
13783
- drag(e.getX(), e.getY(), e.getModifiersEx());
13824
+ drag(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx());
1378413825
1378513826 //try { Thread.sleep(1); } catch (Exception ex) {}
1378613827 }
....@@ -14017,7 +14058,7 @@
1401714058 {
1401814059 Globals.lighttouched = true;
1401914060 }
14020
- drag(X, (mouseMode != 0) ? Y : anchorY, MODIFIERS);
14061
+ drag(X, (mouseMode != 0) ? Y : anchorY, 0, MODIFIERS);
1402114062 }
1402214063 //else
1402314064 }
....@@ -14117,7 +14158,7 @@
1411714158 int X, Y;
1411814159 boolean SX, SY;
1411914160
14120
- void drag(int x, int y, int modifiers)
14161
+ void drag(int x, int y, int modifiers, int modifiersex)
1412114162 {
1412214163 if (IsFrozen())
1412314164 {
....@@ -14126,17 +14167,17 @@
1412614167
1412714168 drag = true; // NEW
1412814169
14129
- boolean continuous = (modifiers & COMMAND) == COMMAND;
14170
+ boolean continuous = (modifiersex & COMMAND) == COMMAND;
1413014171
1413114172 X = x;
1413214173 Y = y;
1413314174 // floating state for animation
14134
- MODIFIERS = modifiers;
14135
- modifiers &= ~1024;
14175
+ MODIFIERS = modifiersex;
14176
+ modifiersex &= ~1024;
1413614177 if (false) // modifiers != 0)
1413714178 {
1413814179 //new Exception().printStackTrace();
14139
- System.out.println("mouseDragged: " + modifiers);
14180
+ System.out.println("mouseDragged: " + modifiersex);
1414014181 System.out.println("SHIFT = " + SHIFT);
1414114182 System.out.println("CONTROL = " + COMMAND);
1414214183 System.out.println("META = " + META);
....@@ -14156,7 +14197,7 @@
1415614197 info.camera = renderCamera;
1415714198 info.x = x;
1415814199 info.y = y;
14159
- object.editWindow.copy.doEditDrag(info);
14200
+ object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0);
1416014201 } else
1416114202 {
1416214203 if (x < startX)
....@@ -14333,6 +14374,7 @@
1433314374 public void mouseReleased(MouseEvent e)
1433414375 {
1433514376 movingcamera = false;
14377
+ X = Y = 0;
1433614378 //System.out.println("mouseReleased: " + e);
1433714379 clickEnd(e.getX(), e.getY(), e.getModifiersEx());
1433814380 }
....@@ -14355,9 +14397,9 @@
1435514397 boolean control = ((modifiers & CTRL) != 0); // june 2013: for point selection
1435614398 boolean command = ((modifiers & COMMAND) != 0); // june 2013: for multiple selection
1435714399
14358
- if (control || command || IsFrozen())
14400
+// No delay if (control || command || IsFrozen())
1435914401 timeout = true;
14360
- else
14402
+// ?? May 2019 else
1436114403 // timer.setDelay((modifiers & 128) != 0?0:350);
1436214404 mouseDown = false;
1436314405 if (!control && !command) // june 2013
....@@ -14467,7 +14509,7 @@
1446714509 System.out.println("keyReleased: " + e);
1446814510 }
1446914511
14470
- void SetMouseMode(int modifiers)
14512
+ void SetMouseMode(int modifiers, int modifiersex)
1447114513 {
1447214514 //System.out.println("SetMouseMode = " + modifiers);
1447314515 //modifiers &= ~1024;
....@@ -14479,25 +14521,25 @@
1447914521 //if (modifiers == 0) // || (modifiers == (1024 | CONTROL)))
1448014522 // return;
1448114523 //System.out.println("SetMode = " + modifiers);
14482
- if ((modifiers & WHEEL) == WHEEL)
14524
+ if ((modifiersex & WHEEL) == WHEEL)
1448314525 {
1448414526 mouseMode |= ZOOM;
1448514527 }
1448614528
1448714529 boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK);
14488
- if (capsLocked || (modifiers & META) == META)
14530
+ if (capsLocked) // || (modifiers & META) == META)
1448914531 {
1449014532 mouseMode |= VR; // BACKFORTH;
1449114533 }
14492
- if ((modifiers & CTRLCLICK) == CTRLCLICK)
14534
+ if ((modifiersex & CTRLCLICK) == CTRLCLICK)
1449314535 {
1449414536 mouseMode |= SELECT;
1449514537 }
14496
- if ((modifiers & COMMAND) == COMMAND)
14538
+ if ((modifiersex & COMMAND) == COMMAND)
1449714539 {
1449814540 mouseMode |= SELECT;
1449914541 }
14500
- if ((modifiers & SHIFT) == SHIFT || forcetranslate)
14542
+ if ((modifiersex & SHIFT) == SHIFT || forcetranslate || (modifiers & MouseEvent.BUTTON3_MASK) != 0)
1450114543 {
1450214544 mouseMode &= ~VR;
1450314545 mouseMode |= TRANSLATE;
....@@ -14526,7 +14568,7 @@
1452614568
1452714569 if (isRenderer) //
1452814570 {
14529
- SetMouseMode(modifiers);
14571
+ SetMouseMode(0, modifiers);
1453014572 }
1453114573
1453214574 Globals.theRenderer.keyPressed(key);
....@@ -14862,7 +14904,7 @@
1486214904 //RESIZETEXTURE ^= true;
1486314905 //break;
1486414906 case 'z':
14865
- RENDERSHADOW ^= true;
14907
+ Globals.RENDERSHADOW ^= true;
1486614908 Globals.lighttouched = true;
1486714909 repaint();
1486814910 break;
....@@ -14986,7 +15028,7 @@
1498615028 //mode = ROTATE;
1498715029 if ((MODIFIERS & COMMAND) == 0) // VR??
1498815030 {
14989
- SetMouseMode(modifiers);
15031
+ SetMouseMode(0, modifiers);
1499015032 }
1499115033 }
1499215034
....@@ -15122,7 +15164,7 @@
1512215164 {
1512315165 //System.out.println("processMouseMotionEvent: " + mouseMode + " " + e.getModifiers() + " " + e.getModifiersEx() + " " + e.getButton());
1512415166 //if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0)
15125
- if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (mouseMode & SELECT) == 0)
15167
+ if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (e.getModifiers() & MouseEvent.BUTTON3_MASK) == 0 && (mouseMode & SELECT) == 0)
1512615168 {
1512715169 mouseMoved(e);
1512815170 } else
....@@ -15341,7 +15383,9 @@
1534115383 info.bounds.setBounds(0, 0, (int) (width * zoom), (int) (height * zoom));
1534215384 //Image img = CreateImage(width, height);
1534315385 //System.out.println("width = " + width + "; height = " + height + "\n");
15386
+
1534415387 Graphics gr = g; // img.getGraphics();
15388
+
1534515389 if (!hasMarquee)
1534615390 {
1534715391 if (Xmin < Xmax) // !locked)
....@@ -15439,14 +15483,28 @@
1543915483 if (!isRenderer)
1544015484 {
1544115485 object.drawEditHandles(info, 0);
15486
+
15487
+ if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0)
15488
+ {
15489
+ switch (object.selection.get(0).hitSomething)
15490
+ {
15491
+ case Object3D.hitCenter: gr.setColor(Color.pink); break;
15492
+ case Object3D.hitRotate: gr.setColor(Color.green); break;
15493
+ case Object3D.hitScale: gr.setColor(Color.cyan); break;
15494
+ }
15495
+
15496
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15497
+ }
1544215498 }
1544315499 }
15500
+
1544415501 if (isRenderer)
1544515502 {
1544615503 //gr.setColor(Color.black);
1544715504 //gr.drawRect(info.bounds.x - 1, info.bounds.y - 1, info.bounds.width + 1, info.bounds.height + 1);
1544815505 //gr.drawRect(info.bounds.x - 2, info.bounds.y - 2, info.bounds.width + 3, info.bounds.height + 3);
1544915506 }
15507
+
1545015508 if (hasMarquee)
1545115509 {
1545215510 gr.setXORMode(Color.white);
....@@ -15559,6 +15617,7 @@
1555915617 public boolean mouseDown(Event evt, int x, int y)
1556015618 {
1556115619 System.out.println("mouseDown: " + evt);
15620
+ System.exit(0);
1556215621 /*
1556315622 locked = true;
1556415623 drag = false;
....@@ -15602,7 +15661,7 @@
1560215661 {
1560315662 keyPressed(0, modifiers);
1560415663 }
15605
- clickStart(x, y, modifiers);
15664
+ // clickStart(x, y, modifiers);
1560615665 return true;
1560715666 }
1560815667
....@@ -15720,7 +15779,7 @@
1572015779 {
1572115780 keyReleased(0, 0);
1572215781 }
15723
- drag(x, y, modifiers);
15782
+ drag(x, y, 0, modifiers);
1572415783 return true;
1572515784 }
1572615785
....@@ -16418,16 +16477,16 @@
1641816477 System.out.println("; fromto " + sel + " " + Trunk(previousselectedpoint.toParent[3][0]) + " " + Trunk(previousselectedpoint.toParent[3][2]) + " " + Trunk(selectedpoint.toParent[3][0]) + " " + Trunk(selectedpoint.toParent[3][2]));
1641916478 }
1642016479
16421
- previousselectedpoint = (Sphere) GrafreeD.clone(selectedpoint);
16480
+ previousselectedpoint = (Sphere) Grafreed.clone(selectedpoint);
1642216481 }
1642316482 }
1642416483
1642516484 if (!movingcamera && !PAINTMODE)
1642616485 object.editWindow.ScreenFitPoint(); // fev 2014
1642716486
16428
- if (PAINTMODE && GrafreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
16487
+ if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
1642916488 {
16430
- Object3D paintobj = GrafreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0);
16489
+ Object3D paintobj = Grafreed.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0);
1643116490
1643216491 Object3D group = new Object3D("inst" + paintcount++);
1643316492
....@@ -16583,7 +16642,7 @@
1658316642 gl.glDisable(gl.GL_CULL_FACE);
1658416643 }
1658516644
16586
- if (!RENDERSHADOW)
16645
+ if (!Globals.RENDERSHADOW)
1658716646 gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
1658816647
1658916648 // SB gl.glPolygonOffset(2.5f, 10);
....@@ -16593,7 +16652,7 @@
1659316652 //gl.glColorMask(false, false, false, false);
1659416653
1659516654 //render_scene_from_light_view(gl, drawable, 0, 0);
16596
- if (RENDERSHADOW && Globals.lighttouched && !movingcamera) // && !parent.IsFreezed())
16655
+ if (Globals.RENDERSHADOW && Globals.lighttouched && (!movingcamera || !Globals.FREEZEONMOVE)) // && !parent.IsFreezed())
1659716656 {
1659816657 gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
1659916658