Normand Briere
2019-06-09 3ae9b1de47e51e7c150412f2bb14383cb6a5f8f8
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)
....@@ -14355,9 +14396,9 @@
1435514396 boolean control = ((modifiers & CTRL) != 0); // june 2013: for point selection
1435614397 boolean command = ((modifiers & COMMAND) != 0); // june 2013: for multiple selection
1435714398
14358
- if (control || command || IsFrozen())
14399
+// No delay if (control || command || IsFrozen())
1435914400 timeout = true;
14360
- else
14401
+// ?? May 2019 else
1436114402 // timer.setDelay((modifiers & 128) != 0?0:350);
1436214403 mouseDown = false;
1436314404 if (!control && !command) // june 2013
....@@ -14467,7 +14508,7 @@
1446714508 System.out.println("keyReleased: " + e);
1446814509 }
1446914510
14470
- void SetMouseMode(int modifiers)
14511
+ void SetMouseMode(int modifiers, int modifiersex)
1447114512 {
1447214513 //System.out.println("SetMouseMode = " + modifiers);
1447314514 //modifiers &= ~1024;
....@@ -14479,25 +14520,25 @@
1447914520 //if (modifiers == 0) // || (modifiers == (1024 | CONTROL)))
1448014521 // return;
1448114522 //System.out.println("SetMode = " + modifiers);
14482
- if ((modifiers & WHEEL) == WHEEL)
14523
+ if ((modifiersex & WHEEL) == WHEEL)
1448314524 {
1448414525 mouseMode |= ZOOM;
1448514526 }
1448614527
1448714528 boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK);
14488
- if (capsLocked || (modifiers & META) == META)
14529
+ if (capsLocked) // || (modifiers & META) == META)
1448914530 {
1449014531 mouseMode |= VR; // BACKFORTH;
1449114532 }
14492
- if ((modifiers & CTRLCLICK) == CTRLCLICK)
14533
+ if ((modifiersex & CTRLCLICK) == CTRLCLICK)
1449314534 {
1449414535 mouseMode |= SELECT;
1449514536 }
14496
- if ((modifiers & COMMAND) == COMMAND)
14537
+ if ((modifiersex & COMMAND) == COMMAND)
1449714538 {
1449814539 mouseMode |= SELECT;
1449914540 }
14500
- if ((modifiers & SHIFT) == SHIFT || forcetranslate)
14541
+ if ((modifiersex & SHIFT) == SHIFT || forcetranslate || (modifiers & MouseEvent.BUTTON3_MASK) != 0)
1450114542 {
1450214543 mouseMode &= ~VR;
1450314544 mouseMode |= TRANSLATE;
....@@ -14526,7 +14567,7 @@
1452614567
1452714568 if (isRenderer) //
1452814569 {
14529
- SetMouseMode(modifiers);
14570
+ SetMouseMode(0, modifiers);
1453014571 }
1453114572
1453214573 Globals.theRenderer.keyPressed(key);
....@@ -14862,7 +14903,7 @@
1486214903 //RESIZETEXTURE ^= true;
1486314904 //break;
1486414905 case 'z':
14865
- RENDERSHADOW ^= true;
14906
+ Globals.RENDERSHADOW ^= true;
1486614907 Globals.lighttouched = true;
1486714908 repaint();
1486814909 break;
....@@ -14986,7 +15027,7 @@
1498615027 //mode = ROTATE;
1498715028 if ((MODIFIERS & COMMAND) == 0) // VR??
1498815029 {
14989
- SetMouseMode(modifiers);
15030
+ SetMouseMode(0, modifiers);
1499015031 }
1499115032 }
1499215033
....@@ -15122,7 +15163,7 @@
1512215163 {
1512315164 //System.out.println("processMouseMotionEvent: " + mouseMode + " " + e.getModifiers() + " " + e.getModifiersEx() + " " + e.getButton());
1512415165 //if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0)
15125
- if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (mouseMode & SELECT) == 0)
15166
+ if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (e.getModifiers() & MouseEvent.BUTTON3_MASK) == 0 && (mouseMode & SELECT) == 0)
1512615167 {
1512715168 mouseMoved(e);
1512815169 } else
....@@ -15559,6 +15600,7 @@
1555915600 public boolean mouseDown(Event evt, int x, int y)
1556015601 {
1556115602 System.out.println("mouseDown: " + evt);
15603
+ System.exit(0);
1556215604 /*
1556315605 locked = true;
1556415606 drag = false;
....@@ -15602,7 +15644,7 @@
1560215644 {
1560315645 keyPressed(0, modifiers);
1560415646 }
15605
- clickStart(x, y, modifiers);
15647
+ // clickStart(x, y, modifiers);
1560615648 return true;
1560715649 }
1560815650
....@@ -15720,7 +15762,7 @@
1572015762 {
1572115763 keyReleased(0, 0);
1572215764 }
15723
- drag(x, y, modifiers);
15765
+ drag(x, y, 0, modifiers);
1572415766 return true;
1572515767 }
1572615768
....@@ -16418,16 +16460,16 @@
1641816460 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]));
1641916461 }
1642016462
16421
- previousselectedpoint = (Sphere) GrafreeD.clone(selectedpoint);
16463
+ previousselectedpoint = (Sphere) Grafreed.clone(selectedpoint);
1642216464 }
1642316465 }
1642416466
1642516467 if (!movingcamera && !PAINTMODE)
1642616468 object.editWindow.ScreenFitPoint(); // fev 2014
1642716469
16428
- if (PAINTMODE && GrafreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
16470
+ if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
1642916471 {
16430
- Object3D paintobj = GrafreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0);
16472
+ Object3D paintobj = Grafreed.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0);
1643116473
1643216474 Object3D group = new Object3D("inst" + paintcount++);
1643316475
....@@ -16583,7 +16625,7 @@
1658316625 gl.glDisable(gl.GL_CULL_FACE);
1658416626 }
1658516627
16586
- if (!RENDERSHADOW)
16628
+ if (!Globals.RENDERSHADOW)
1658716629 gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
1658816630
1658916631 // SB gl.glPolygonOffset(2.5f, 10);
....@@ -16593,7 +16635,7 @@
1659316635 //gl.glColorMask(false, false, false, false);
1659416636
1659516637 //render_scene_from_light_view(gl, drawable, 0, 0);
16596
- if (RENDERSHADOW && Globals.lighttouched && !movingcamera) // && !parent.IsFreezed())
16638
+ if (Globals.RENDERSHADOW && Globals.lighttouched && (!movingcamera || !Globals.FREEZEONMOVE)) // && !parent.IsFreezed())
1659716639 {
1659816640 gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
1659916641