Normand Briere
2019-06-16 372b7fd481a476cd659713a4a01bf28bf6760cbe
CameraPane.java
....@@ -150,6 +150,8 @@
150150 defaultcaps.setAccumAlphaBits(16);
151151 }
152152
153
+ private File defaultDirectory = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory();
154
+
153155 void SetAsGLRenderer(boolean b)
154156 {
155157 isRenderer = b;
....@@ -462,7 +464,7 @@
462464 if (!selectmode) // display.drawMode != display.SELECTION) // && display.drawMode != display.SHADOW) // (attributes & FILL) != 0)
463465 {
464466 //gl.glBegin(gl.GL_TRIANGLES);
465
- boolean hasnorm = pv.norm != null; // && (pv.norm.x != 0 || pv.norm.y != 0 || pv.norm.z != 0);
467
+ boolean hasnorm = pv.norm != null && (pv.norm.x != 0 || pv.norm.y != 0 || pv.norm.z != 0);
466468 if (!hasnorm)
467469 {
468470 // System.out.println("FUCK!!");
....@@ -1628,7 +1630,7 @@
16281630
16291631 cColor.HSBtoRGB(display.color, display.saturation, 1, display.modelParams0);
16301632
1631
- float[] colorV = GrafreeD.colorV;
1633
+ float[] colorV = Grafreed.colorV;
16321634
16331635 /**/
16341636 if (display.DrawMode() == display.DEFAULT) // && display.RENDERPROGRAM == 0)
....@@ -1888,7 +1890,7 @@
18881890 void PushMatrix(double[][] matrix)
18891891 {
18901892 // GrafreeD.tracein(matrix);
1891
- PushMatrix(matrix,1);
1893
+ PushMatrix(matrix, 1);
18921894 }
18931895
18941896 void PushMatrix()
....@@ -2140,7 +2142,7 @@
21402142 System.err.println("LIVE = " + Globals.isLIVE());
21412143
21422144 if (!Globals.isLIVE()) // save sound
2143
- GrafreeD.savesound = true; // wav.save();
2145
+ Grafreed.savesound = true; // wav.save();
21442146 // else
21452147 repaint(); // start loop // may 2013
21462148 }
....@@ -2265,7 +2267,7 @@
22652267 LOOKAT ^= true;
22662268 }
22672269
2268
- void ToggleRandom()
2270
+ void ToggleSwitch()
22692271 {
22702272 SWITCH ^= true;
22712273 }
....@@ -2374,7 +2376,7 @@
23742376 {
23752377 return currentGL;
23762378 }
2377
-
2379
+
23782380 /**/
23792381 class CacheTexture
23802382 {
....@@ -8022,7 +8024,7 @@
80228024 }
80238025 }
80248026
8025
- /*boolean*/ public void BindTextures(cTexture tex, int resolution) // INTERFACE
8027
+ /*boolean*/ public void BindTextures(cTexture tex, int resolution) throws Exception // INTERFACE
80268028 {
80278029 if (// DrawMode() != 0 || /*tex == null ||*/
80288030 ambientOcclusion ) // || !textureon)
....@@ -8067,7 +8069,27 @@
80678069 return; // true;
80688070 }
80698071
8070
- CacheTexture GetCacheTexture(String tex, boolean bump, int resolution)
8072
+ java.util.HashSet<String> missingTextures = new java.util.HashSet<String>();
8073
+
8074
+ private boolean FileExists(String tex)
8075
+ {
8076
+ if (missingTextures.contains(tex))
8077
+ {
8078
+ return false;
8079
+ }
8080
+
8081
+ boolean fileExists = new File(tex).exists();
8082
+
8083
+ if (!fileExists)
8084
+ {
8085
+ // If file exists, the "new File()" is not executed sgain
8086
+ missingTextures.add(tex);
8087
+ }
8088
+
8089
+ return fileExists;
8090
+ }
8091
+
8092
+ CacheTexture GetCacheTexture(String tex, boolean bump, int resolution) throws Exception
80718093 {
80728094 CacheTexture/*com.sun.opengl.util.texture.Texture*/ texture = null;
80738095
....@@ -8075,15 +8097,17 @@
80758097 {
80768098 String texname = tex;
80778099
8100
+ String fallbackTextureName = defaultDirectory + "/Textures/" + texname;
8101
+
80788102 // String[] split = tex.split("Textures");
80798103 // if (split.length > 1)
80808104 // texname = "/Users/nbriere/Textures" + split[split.length-1];
80818105 // else
80828106 // if (!texname.startsWith("/"))
80838107 // texname = "/Users/nbriere/Textures/" + texname;
8084
- if (!new File(tex).exists())
8108
+ if (!FileExists(tex))
80858109 {
8086
- texname = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory() + "/Textures/" + texname;
8110
+ texname = fallbackTextureName;
80878111 }
80888112
80898113 if (CACHETEXTURE)
....@@ -8153,7 +8177,7 @@
81538177 }
81548178
81558179 cachename = texname.substring(0, texname.length()-4)+ext+".jpg";
8156
- if (!new File(cachename).exists())
8180
+ if (!FileExists(cachename))
81578181 cachename = texname;
81588182 else
81598183 processbump = false; // don't process bump map again
....@@ -8175,7 +8199,7 @@
81758199 }
81768200
81778201 cachename = texname.substring(0, texname.length()-4)+ext+".png";
8178
- if (!new File(cachename).exists())
8202
+ if (!FileExists(cachename))
81798203 cachename = texname;
81808204 else
81818205 processbump = false; // don't process bump map again
....@@ -8184,7 +8208,9 @@
81848208 texturedata = GetFileTexture(cachename, processbump, resolution);
81858209
81868210
8187
- if (texturedata != null)
8211
+ if (texturedata == null)
8212
+ throw new Exception();
8213
+
81888214 texture = new CacheTexture(com.sun.opengl.util.texture.TextureIO.newTexture(texturedata),resolution);
81898215 //texture = GetTexture(tex, bump);
81908216 }
....@@ -8306,7 +8332,7 @@
83068332 return texture;
83078333 }
83088334
8309
- com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution)
8335
+ com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution) throws Exception
83108336 {
83118337 CacheTexture texture = GetCacheTexture(tex, bump, resolution);
83128338
....@@ -8324,14 +8350,14 @@
83248350 return texture!=null?texture.texture:null;
83258351 }
83268352
8327
- public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution)
8353
+ public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution) throws Exception
83288354 {
83298355 CacheTexture texture = GetCacheTexture(tex, bump, resolution);
83308356
83318357 return texture!=null?texture.texturedata:null;
83328358 }
83338359
8334
- boolean BindTexture(String tex, boolean bump, int resolution)
8360
+ boolean BindTexture(String tex, boolean bump, int resolution) throws Exception
83358361 {
83368362 if (/*tex == null ||*/ ambientOcclusion ) // || !textureon)
83378363 {
....@@ -9308,8 +9334,8 @@
93089334 assert (parentcam != renderCamera);
93099335
93109336 if (renderCamera != lightCamera)
9311
- for (int count = parentcam.GetTransformCount(); --count>=0;)
9312
- LA.matConcat(matrix, parentcam.toParent, matrix);
9337
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
9338
+ LA.matConcat(matrix, parentcam.GlobalTransform(), matrix);
93139339
93149340 // LA.matConcat(renderCamera.toScreen, renderCamera.toParent, matrix);
93159341
....@@ -9324,8 +9350,8 @@
93249350 LA.matCopy(renderCamera.fromScreen, matrix);
93259351
93269352 if (renderCamera != lightCamera)
9327
- for (int count = parentcam.GetTransformCount(); --count>=0;)
9328
- LA.matConcat(parentcam.fromParent, matrix, matrix);
9353
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
9354
+ LA.matConcat(parentcam.GlobalTransformInv(), matrix, matrix);
93299355
93309356 // LA.matConcat(renderCamera.fromParent, renderCamera.fromScreen, matrix);
93319357
....@@ -9542,7 +9568,7 @@
95429568
95439569 if (!BOXMODE)
95449570 {
9545
- System.out.println("image: " + fullname + " (wav cursor=" + (GrafreeD.wav.cursor / 735 / 4) + ")");
9571
+ System.out.println("image: " + fullname + " (wav cursor=" + (Grafreed.wav.cursor / 735 / 4) + ")");
95469572 }
95479573
95489574 if (!BOXMODE)
....@@ -9580,7 +9606,7 @@
95809606 ABORTED = false;
95819607 }
95829608 else
9583
- GrafreeD.wav.cursor += 735 * ACSIZE;
9609
+ Grafreed.wav.cursor += 735 * ACSIZE;
95849610
95859611 if (false)
95869612 {
....@@ -10243,11 +10269,11 @@
1024310269
1024410270 public void display(GLAutoDrawable drawable)
1024510271 {
10246
- if (GrafreeD.savesound && GrafreeD.hassound)
10272
+ if (Grafreed.savesound && Grafreed.hassound)
1024710273 {
10248
- GrafreeD.wav.save();
10249
- GrafreeD.savesound = false;
10250
- GrafreeD.hassound = false;
10274
+ Grafreed.wav.save();
10275
+ Grafreed.savesound = false;
10276
+ Grafreed.hassound = false;
1025110277 }
1025210278 // if (DEBUG_SELECTION)
1025310279 // {
....@@ -10377,7 +10403,7 @@
1037710403 Object3D theobject = object;
1037810404 Object3D theparent = object.parent;
1037910405 object.parent = null;
10380
- object = (Object3D)GrafreeD.clone(object);
10406
+ object = (Object3D)Grafreed.clone(object);
1038110407 object.Stripify();
1038210408 if (theobject.selection == null || theobject.selection.Size() == 0)
1038310409 theobject.PreprocessOcclusion(this);
....@@ -10390,13 +10416,13 @@
1039010416 ambientOcclusion = false;
1039110417 }
1039210418
10393
- if (Globals.lighttouched && DrawMode() == DEFAULT && !lightMode) // && !FROZEN)
10419
+ if (Globals.lighttouched && DrawMode() == DEFAULT) // && !lightMode) // && !FROZEN)
1039410420 {
1039510421 //if (RENDERSHADOW) // ?
1039610422 if (!IsFrozen())
1039710423 {
1039810424 // dec 2012
10399
- if (!ambientOcclusion && !(!flash && !lightMode && DrawMode() == DEFAULT && ANTIALIAS > 0))
10425
+ if (!ambientOcclusion && !(!flash && DrawMode() == DEFAULT && ANTIALIAS > 0))
1040010426 {
1040110427 Globals.framecount++;
1040210428 shadowbuffer.display();
....@@ -10523,8 +10549,8 @@
1052310549
1052410550 // if (parentcam != renderCamera) // not a light
1052510551 if (cam != lightCamera)
10526
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10527
- LA.matConcat(matrix, parentcam.toParent, matrix);
10552
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
10553
+ LA.matConcat(matrix, parentcam.GlobalTransform(), matrix);
1052810554
1052910555 for (int j = 0; j < 4; j++)
1053010556 {
....@@ -10538,8 +10564,8 @@
1053810564
1053910565 // if (parentcam != renderCamera) // not a light
1054010566 if (cam != lightCamera)
10541
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10542
- LA.matConcat(parentcam.fromParent, matrix, matrix);
10567
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
10568
+ LA.matConcat(parentcam.GlobalTransformInv(), matrix, matrix);
1054310569
1054410570 //LA.matConcat(cam.fromScreen, parentcam.fromParent, matrix);
1054510571
....@@ -10798,7 +10824,16 @@
1079810824 // Bump noise
1079910825 gl.glActiveTexture(GL.GL_TEXTURE6);
1080010826 //gl.glBindTexture(GL.GL_TEXTURE_2D, bump_noise);
10801
- BindTexture(NOISE_TEXTURE, false, 2);
10827
+
10828
+ try
10829
+ {
10830
+ BindTexture(NOISE_TEXTURE, false, 2);
10831
+ }
10832
+ catch (Exception e)
10833
+ {
10834
+ System.err.println("FAILED: " + NOISE_TEXTURE);
10835
+ }
10836
+
1080210837
1080310838 gl.glActiveTexture(GL.GL_TEXTURE0);
1080410839 gl.glEnable(GL.GL_TEXTURE_2D);
....@@ -10923,8 +10958,8 @@
1092310958 System.err.println("parentcam != renderCamera");
1092410959
1092510960 // if (cam != lightCamera)
10926
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10927
- LA.xformDir(lightposition, parentcam.toParent, lightposition); // may 2013
10961
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
10962
+ LA.xformDir(lightposition, parentcam.GlobalTransform(), lightposition); // may 2013
1092810963 }
1092910964
1093010965 LA.xformDir(lightposition, cam.toScreen, lightposition);
....@@ -10945,8 +10980,8 @@
1094510980 if (true) // TODO
1094610981 {
1094710982 if (cam != lightCamera)
10948
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10949
- LA.xformDir(light0, parentcam.toParent, light0); // may 2013
10983
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
10984
+ LA.xformDir(light0, parentcam.GlobalTransform(), light0); // may 2013
1095010985 }
1095110986
1095210987 LA.xformPos(light0, cam.toScreen, light0);
....@@ -11283,8 +11318,8 @@
1128311318 e.printStackTrace();
1128411319 }
1128511320
11286
- if (GrafreeD.RENDERME > 0)
11287
- GrafreeD.RENDERME--; // mechante magouille
11321
+ if (Grafreed.RENDERME > 0)
11322
+ Grafreed.RENDERME--; // mechante magouille
1128811323
1128911324 Globals.ONESTEP = false;
1129011325 }
....@@ -11354,7 +11389,14 @@
1135411389
1135511390 usedtextures.clear();
1135611391
11357
- BindTextures(DEFAULT_TEXTURES, 2);
11392
+ try
11393
+ {
11394
+ BindTextures(DEFAULT_TEXTURES, 2);
11395
+ }
11396
+ catch (Exception e)
11397
+ {
11398
+ System.err.println("FAILED: " + DEFAULT_TEXTURES);
11399
+ }
1135811400 }
1135911401 //System.out.println("--> " + stackdepth);
1136011402 // GrafreeD.traceon();
....@@ -11445,7 +11487,14 @@
1144511487 if (checker != null && DrawMode() == DEFAULT)
1144611488 {
1144711489 //BindTexture(IMMORTAL_TEXTURE);
11448
- BindTextures(checker.GetTextures(), checker.texres);
11490
+ try
11491
+ {
11492
+ BindTextures(checker.GetTextures(), checker.texres);
11493
+ }
11494
+ catch (Exception e)
11495
+ {
11496
+ System.err.println("FAILED: " + checker.GetTextures());
11497
+ }
1144911498 // NEAREST
1145011499 GetGL().glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); // GL.GL_LINEAR);
1145111500 DrawChecker(gl);
....@@ -11527,7 +11576,7 @@
1152711576 return;
1152811577 }
1152911578
11530
- String string = obj.GetToolTip();
11579
+ String string = obj.toString(); //.GetToolTip();
1153111580
1153211581 GL gl = GetGL();
1153311582
....@@ -11844,8 +11893,8 @@
1184411893 //obj.TransformToWorld(light, light);
1184511894 for (int i = tp.size(); --i >= 0;)
1184611895 {
11847
- for (int count = tp.get(i).GetTransformCount(); --count>=0;)
11848
- LA.xformPos(light, tp.get(i).toParent, light);
11896
+ //for (int count = tp.get(i).GetTransformCount(); --count>=0;)
11897
+ LA.xformPos(light, tp.get(i).GlobalTransform(), light);
1184911898 }
1185011899
1185111900
....@@ -11862,8 +11911,8 @@
1186211911 parentcam = cameras[0];
1186311912 }
1186411913
11865
- for (int count = parentcam.GetTransformCount(); --count>=0;)
11866
- LA.xformPos(light, parentcam.toParent, light); // may 2013
11914
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
11915
+ LA.xformPos(light, parentcam.GlobalTransform(), light); // may 2013
1186711916
1186811917 LA.xformPos(light, renderCamera.toScreen, light);
1186911918
....@@ -12477,8 +12526,8 @@
1247712526
1247812527 // display shadow only (bump == 0)
1247912528 "SUB temp.x, half.x, shadow.x;" +
12480
- "MOV temp.y, -params6.x;" +
12481
- "SLT temp.z, temp.y, zero.x;" +
12529
+ "MOV temp.y, -params5.z;" + // params6.x;" +
12530
+ "SLT temp.z, temp.y, -one2048th.x;" +
1248212531 "SUB temp.y, one.x, temp.z;" +
1248312532 "MUL temp.x, temp.x, temp.y;" +
1248412533 "KIL temp.x;" +
....@@ -12809,7 +12858,7 @@
1280912858 //once = true;
1281012859 }
1281112860
12812
- System.out.print("Program #" + mode + "; length = " + program.length());
12861
+ System.out.print("Program #" + mode + "; instructions = " + program.split(";").length + "; length = " + program.length());
1281312862 System.out.println(" - " + (mode >> 3) + " lights; " + ((mode & 2) == 2 ? "anisoUV " : "") + ((mode & 4) == 4 ? "SoftShadow " : ""));
1281412863 loadProgram(gl, GL.GL_FRAGMENT_PROGRAM_ARB, program);
1281512864
....@@ -12942,12 +12991,16 @@
1294212991
1294312992 "ADD " + depth + ".z, " + depth + ".z, temp.x;" +
1294412993 //"SUB " + depth + ".z, " + depth + ".z, temp.x;" + // back face shadowing!
12994
+
12995
+ // Compare fragment depth in light space with shadowmap.
1294512996 "SUB temp.x, fragment.texcoord[1].z, " + depth + ".z;" +
1294612997 "SGE temp.y, temp.x, zero.x;" +
12947
- "SUB " + shadow + ".y, one.x, temp.y;" +
12998
+ "SUB " + shadow + ".y, one.x, temp.y;" + // Specular is fully occluded
12999
+
13000
+ // Reverse comparison
1294813001 "SUB temp.x, one.x, temp.x;" +
1294913002 "MUL " + shadow + ".x, temp.x, temp.y;" +
12950
- "SUB " + shadow + ".x, one.x, " + shadow + ".x;" + // specular is fully occluded
13003
+ "SUB " + shadow + ".x, one.x, " + shadow + ".x;" + // diffuse
1295113004 "POW " + shadow + ".x, " + shadow + ".x, params5.z;" + // fake depth
1295213005
1295313006 "SLT " + shadow + ".z, fragment.texcoord[1].z, " + depth + ".z;" +
....@@ -12961,6 +13014,10 @@
1296113014 // No shadow for backface
1296213015 "DP3 temp.x, normal, lightd;" +
1296313016 "SLT temp.x, temp.x, zero.x;" + // shadoweps
13017
+ "LRP " + shadow + ", temp.x, one, " + shadow + ";" +
13018
+
13019
+ // No shadow when out of frustrum
13020
+ "SGE temp.x, " + depth + ".z, one.z;" +
1296413021 "LRP " + shadow + ", temp.x, one, " + shadow + ";" +
1296513022 "";
1296613023 }
....@@ -13656,6 +13713,10 @@
1365613713 // wasliveok = true;
1365713714 // waslive = false;
1365813715
13716
+ // May 2019 Forget it:
13717
+ if (true)
13718
+ return;
13719
+
1365913720 // source == timer
1366013721 if (mouseDown)
1366113722 {
....@@ -13772,9 +13833,12 @@
1377213833
1377313834 public void mouseDragged(MouseEvent e)
1377413835 {
13836
+ Globals.MOUSEDRAGGED = true;
13837
+
1377513838 //System.out.println("mouseDragged: " + e);
1377613839 if (isRenderer)
1377713840 movingcamera = true;
13841
+
1377813842 //if (drawing)
1377913843 //return;
1378013844 if ((e.getModifiersEx() & CTRL) != 0
....@@ -14336,7 +14400,10 @@
1433614400
1433714401 public void mouseReleased(MouseEvent e)
1433814402 {
14403
+ Globals.MOUSEDRAGGED = false;
14404
+
1433914405 movingcamera = false;
14406
+ X = Y = 0;
1434014407 //System.out.println("mouseReleased: " + e);
1434114408 clickEnd(e.getX(), e.getY(), e.getModifiersEx());
1434214409 }
....@@ -14359,7 +14426,7 @@
1435914426 boolean control = ((modifiers & CTRL) != 0); // june 2013: for point selection
1436014427 boolean command = ((modifiers & COMMAND) != 0); // june 2013: for multiple selection
1436114428
14362
- if (control || command || IsFrozen())
14429
+// No delay if (control || command || IsFrozen())
1436314430 timeout = true;
1436414431 // ?? May 2019 else
1436514432 // timer.setDelay((modifiers & 128) != 0?0:350);
....@@ -14866,7 +14933,7 @@
1486614933 //RESIZETEXTURE ^= true;
1486714934 //break;
1486814935 case 'z':
14869
- RENDERSHADOW ^= true;
14936
+ Globals.RENDERSHADOW ^= true;
1487014937 Globals.lighttouched = true;
1487114938 repaint();
1487214939 break;
....@@ -15345,7 +15412,9 @@
1534515412 info.bounds.setBounds(0, 0, (int) (width * zoom), (int) (height * zoom));
1534615413 //Image img = CreateImage(width, height);
1534715414 //System.out.println("width = " + width + "; height = " + height + "\n");
15415
+
1534815416 Graphics gr = g; // img.getGraphics();
15417
+
1534915418 if (!hasMarquee)
1535015419 {
1535115420 if (Xmin < Xmax) // !locked)
....@@ -15443,14 +15512,33 @@
1544315512 if (!isRenderer)
1544415513 {
1544515514 object.drawEditHandles(info, 0);
15515
+
15516
+ if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0)
15517
+ {
15518
+ switch (object.selection.get(0).hitSomething)
15519
+ {
15520
+ case Object3D.hitCenter: gr.setColor(Color.pink);
15521
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15522
+ break;
15523
+ case Object3D.hitRotate: gr.setColor(Color.yellow);
15524
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15525
+ break;
15526
+ case Object3D.hitScale: gr.setColor(Color.cyan);
15527
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15528
+ break;
15529
+ }
15530
+
15531
+ }
1544615532 }
1544715533 }
15534
+
1544815535 if (isRenderer)
1544915536 {
1545015537 //gr.setColor(Color.black);
1545115538 //gr.drawRect(info.bounds.x - 1, info.bounds.y - 1, info.bounds.width + 1, info.bounds.height + 1);
1545215539 //gr.drawRect(info.bounds.x - 2, info.bounds.y - 2, info.bounds.width + 3, info.bounds.height + 3);
1545315540 }
15541
+
1545415542 if (hasMarquee)
1545515543 {
1545615544 gr.setXORMode(Color.white);
....@@ -15857,7 +15945,7 @@
1585715945 Object3D object;
1585815946 static Object3D trackedobject;
1585915947 Camera renderCamera; // Light or Eye (or Occlusion)
15860
- /*static*/ Camera manipCamera; // Light or Eye
15948
+ /*static*/ Camera manipCamera; // Light or Eye. Can be Light when Eye, not Eye when Light
1586115949 /*static*/ Camera eyeCamera;
1586215950 /*static*/ Camera lightCamera;
1586315951 int cameracount;
....@@ -16423,16 +16511,16 @@
1642316511 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]));
1642416512 }
1642516513
16426
- previousselectedpoint = (Sphere) GrafreeD.clone(selectedpoint);
16514
+ previousselectedpoint = (Sphere) Grafreed.clone(selectedpoint);
1642716515 }
1642816516 }
1642916517
1643016518 if (!movingcamera && !PAINTMODE)
1643116519 object.editWindow.ScreenFitPoint(); // fev 2014
1643216520
16433
- if (PAINTMODE && GrafreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
16521
+ if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
1643416522 {
16435
- Object3D paintobj = GrafreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0);
16523
+ Object3D paintobj = Grafreed.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0);
1643616524
1643716525 Object3D group = new Object3D("inst" + paintcount++);
1643816526
....@@ -16588,7 +16676,7 @@
1658816676 gl.glDisable(gl.GL_CULL_FACE);
1658916677 }
1659016678
16591
- if (!RENDERSHADOW)
16679
+ if (!Globals.RENDERSHADOW)
1659216680 gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
1659316681
1659416682 // SB gl.glPolygonOffset(2.5f, 10);
....@@ -16598,7 +16686,7 @@
1659816686 //gl.glColorMask(false, false, false, false);
1659916687
1660016688 //render_scene_from_light_view(gl, drawable, 0, 0);
16601
- if (RENDERSHADOW && Globals.lighttouched && !movingcamera) // && !parent.IsFreezed())
16689
+ if (Globals.RENDERSHADOW && Globals.lighttouched && (!movingcamera || !Globals.FREEZEONMOVE)) // && !parent.IsFreezed())
1660216690 {
1660316691 gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
1660416692