Normand Briere
2019-06-17 e36047725ce3217618d4e5807ac7c8769b9e3598
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!!");
....@@ -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()
....@@ -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 {
....@@ -7919,6 +7921,64 @@
79197921 ReleaseTexture(pigment, false);
79207922 }
79217923
7924
+ public void ReleasePigmentTexture(cTexture tex) // INTERFACE
7925
+ {
7926
+ if (/*tex == null ||*/ ambientOcclusion ) // || !textureon)
7927
+ {
7928
+ return;
7929
+ }
7930
+
7931
+ if (tex == null)
7932
+ {
7933
+ ReleaseTexture(null, false);
7934
+ return;
7935
+ }
7936
+
7937
+ String pigment = Object3D.GetPigment(tex);
7938
+
7939
+ if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
7940
+ {
7941
+ // System.out.print("RELEASE +++++++++++++++ pigment = " + pigment);
7942
+ // System.out.println("; bump = " + bump);
7943
+ }
7944
+
7945
+ if (pigment.equals(""))
7946
+ {
7947
+ pigment = null;
7948
+ }
7949
+
7950
+ ReleaseTexture(pigment, false);
7951
+ }
7952
+
7953
+ public void ReleaseBumpTexture(cTexture tex) // INTERFACE
7954
+ {
7955
+ if (/*tex == null ||*/ ambientOcclusion ) // || !textureon)
7956
+ {
7957
+ return;
7958
+ }
7959
+
7960
+ if (tex == null)
7961
+ {
7962
+ ReleaseTexture(null, true);
7963
+ return;
7964
+ }
7965
+
7966
+ String bump = Object3D.GetBump(tex);
7967
+
7968
+ if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
7969
+ {
7970
+ // System.out.print("RELEASE +++++++++++++++ pigment = " + pigment);
7971
+ // System.out.println("; bump = " + bump);
7972
+ }
7973
+
7974
+ if (bump.equals(""))
7975
+ {
7976
+ bump = null;
7977
+ }
7978
+
7979
+ ReleaseTexture(bump, true);
7980
+ }
7981
+
79227982 void ReleaseTexture(String tex, boolean bump)
79237983 {
79247984 if (// DrawMode() != 0 || /*tex == null ||*/
....@@ -8022,7 +8082,7 @@
80228082 }
80238083 }
80248084
8025
- /*boolean*/ public void BindTextures(cTexture tex, int resolution) // INTERFACE
8085
+ /*boolean*/ public void BindTextures(cTexture tex, int resolution) throws Exception // INTERFACE
80268086 {
80278087 if (// DrawMode() != 0 || /*tex == null ||*/
80288088 ambientOcclusion ) // || !textureon)
....@@ -8067,7 +8127,94 @@
80678127 return; // true;
80688128 }
80698129
8070
- CacheTexture GetCacheTexture(String tex, boolean bump, int resolution)
8130
+ /*boolean*/ public void BindPigmentTexture(cTexture tex, int resolution) throws Exception // INTERFACE
8131
+ {
8132
+ if (// DrawMode() != 0 || /*tex == null ||*/
8133
+ ambientOcclusion ) // || !textureon)
8134
+ {
8135
+ return; // false;
8136
+ }
8137
+
8138
+ if (tex == null)
8139
+ {
8140
+ BindTexture(null,false,resolution);
8141
+ return;
8142
+ }
8143
+
8144
+ String pigment = Object3D.GetPigment(tex);
8145
+
8146
+ usedtextures.put(pigment, pigment);
8147
+
8148
+ if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
8149
+ {
8150
+ // System.out.print("BIND +++++++++++++++ pigment = " + pigment);
8151
+ // System.out.println("; bump = " + bump);
8152
+ }
8153
+
8154
+ if (pigment.equals(""))
8155
+ {
8156
+ pigment = null;
8157
+ }
8158
+
8159
+ GetGL().glActiveTexture(GetGL().GL_TEXTURE0);
8160
+ BindTexture(pigment, false, resolution);
8161
+ }
8162
+
8163
+ /*boolean*/ public void BindBumpTexture(cTexture tex, int resolution) throws Exception // INTERFACE
8164
+ {
8165
+ if (// DrawMode() != 0 || /*tex == null ||*/
8166
+ ambientOcclusion ) // || !textureon)
8167
+ {
8168
+ return; // false;
8169
+ }
8170
+
8171
+ if (tex == null)
8172
+ {
8173
+ BindTexture(null,true,resolution);
8174
+ return;
8175
+ }
8176
+
8177
+ String bump = Object3D.GetBump(tex);
8178
+
8179
+ usedtextures.put(bump, bump);
8180
+
8181
+ if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
8182
+ {
8183
+ // System.out.print("BIND +++++++++++++++ pigment = " + pigment);
8184
+ // System.out.println("; bump = " + bump);
8185
+ }
8186
+
8187
+ if (bump.equals(""))
8188
+ {
8189
+ bump = null;
8190
+ }
8191
+
8192
+ GetGL().glActiveTexture(GetGL().GL_TEXTURE2);
8193
+ BindTexture(bump, true, resolution);
8194
+ GetGL().glActiveTexture(GetGL().GL_TEXTURE0);
8195
+ }
8196
+
8197
+ java.util.HashSet<String> missingTextures = new java.util.HashSet<String>();
8198
+
8199
+ private boolean FileExists(String tex)
8200
+ {
8201
+ if (missingTextures.contains(tex))
8202
+ {
8203
+ return false;
8204
+ }
8205
+
8206
+ boolean fileExists = new File(tex).exists();
8207
+
8208
+ if (!fileExists)
8209
+ {
8210
+ // If file exists, the "new File()" is not executed sgain
8211
+ missingTextures.add(tex);
8212
+ }
8213
+
8214
+ return fileExists;
8215
+ }
8216
+
8217
+ CacheTexture GetCacheTexture(String tex, boolean bump, int resolution) throws Exception
80718218 {
80728219 CacheTexture/*com.sun.opengl.util.texture.Texture*/ texture = null;
80738220
....@@ -8075,15 +8222,17 @@
80758222 {
80768223 String texname = tex;
80778224
8225
+ String fallbackTextureName = defaultDirectory + "/Textures/" + texname;
8226
+
80788227 // String[] split = tex.split("Textures");
80798228 // if (split.length > 1)
80808229 // texname = "/Users/nbriere/Textures" + split[split.length-1];
80818230 // else
80828231 // if (!texname.startsWith("/"))
80838232 // texname = "/Users/nbriere/Textures/" + texname;
8084
- if (!new File(tex).exists())
8233
+ if (!FileExists(tex))
80858234 {
8086
- texname = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory() + "/Textures/" + texname;
8235
+ texname = fallbackTextureName;
80878236 }
80888237
80898238 if (CACHETEXTURE)
....@@ -8153,7 +8302,7 @@
81538302 }
81548303
81558304 cachename = texname.substring(0, texname.length()-4)+ext+".jpg";
8156
- if (!new File(cachename).exists())
8305
+ if (!FileExists(cachename))
81578306 cachename = texname;
81588307 else
81598308 processbump = false; // don't process bump map again
....@@ -8175,7 +8324,7 @@
81758324 }
81768325
81778326 cachename = texname.substring(0, texname.length()-4)+ext+".png";
8178
- if (!new File(cachename).exists())
8327
+ if (!FileExists(cachename))
81798328 cachename = texname;
81808329 else
81818330 processbump = false; // don't process bump map again
....@@ -8184,7 +8333,9 @@
81848333 texturedata = GetFileTexture(cachename, processbump, resolution);
81858334
81868335
8187
- if (texturedata != null)
8336
+ if (texturedata == null)
8337
+ throw new Exception();
8338
+
81888339 texture = new CacheTexture(com.sun.opengl.util.texture.TextureIO.newTexture(texturedata),resolution);
81898340 //texture = GetTexture(tex, bump);
81908341 }
....@@ -8306,7 +8457,7 @@
83068457 return texture;
83078458 }
83088459
8309
- com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution)
8460
+ com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution) throws Exception
83108461 {
83118462 CacheTexture texture = GetCacheTexture(tex, bump, resolution);
83128463
....@@ -8324,14 +8475,14 @@
83248475 return texture!=null?texture.texture:null;
83258476 }
83268477
8327
- public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution)
8478
+ public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution) throws Exception
83288479 {
83298480 CacheTexture texture = GetCacheTexture(tex, bump, resolution);
83308481
83318482 return texture!=null?texture.texturedata:null;
83328483 }
83338484
8334
- boolean BindTexture(String tex, boolean bump, int resolution)
8485
+ boolean BindTexture(String tex, boolean bump, int resolution) throws Exception
83358486 {
83368487 if (/*tex == null ||*/ ambientOcclusion ) // || !textureon)
83378488 {
....@@ -9308,8 +9459,8 @@
93089459 assert (parentcam != renderCamera);
93099460
93109461 if (renderCamera != lightCamera)
9311
- for (int count = parentcam.GetTransformCount(); --count>=0;)
9312
- LA.matConcat(matrix, parentcam.toParent, matrix);
9462
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
9463
+ LA.matConcat(matrix, parentcam.GlobalTransform(), matrix);
93139464
93149465 // LA.matConcat(renderCamera.toScreen, renderCamera.toParent, matrix);
93159466
....@@ -9324,8 +9475,8 @@
93249475 LA.matCopy(renderCamera.fromScreen, matrix);
93259476
93269477 if (renderCamera != lightCamera)
9327
- for (int count = parentcam.GetTransformCount(); --count>=0;)
9328
- LA.matConcat(parentcam.fromParent, matrix, matrix);
9478
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
9479
+ LA.matConcat(parentcam.GlobalTransformInv(), matrix, matrix);
93299480
93309481 // LA.matConcat(renderCamera.fromParent, renderCamera.fromScreen, matrix);
93319482
....@@ -10390,13 +10541,13 @@
1039010541 ambientOcclusion = false;
1039110542 }
1039210543
10393
- if (Globals.lighttouched && DrawMode() == DEFAULT && !lightMode) // && !FROZEN)
10544
+ if (Globals.lighttouched && DrawMode() == DEFAULT) // && !lightMode) // && !FROZEN)
1039410545 {
1039510546 //if (RENDERSHADOW) // ?
1039610547 if (!IsFrozen())
1039710548 {
1039810549 // dec 2012
10399
- if (!ambientOcclusion && !(!flash && !lightMode && DrawMode() == DEFAULT && ANTIALIAS > 0))
10550
+ if (!ambientOcclusion && !(!flash && DrawMode() == DEFAULT && ANTIALIAS > 0))
1040010551 {
1040110552 Globals.framecount++;
1040210553 shadowbuffer.display();
....@@ -10523,8 +10674,8 @@
1052310674
1052410675 // if (parentcam != renderCamera) // not a light
1052510676 if (cam != lightCamera)
10526
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10527
- LA.matConcat(matrix, parentcam.toParent, matrix);
10677
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
10678
+ LA.matConcat(matrix, parentcam.GlobalTransform(), matrix);
1052810679
1052910680 for (int j = 0; j < 4; j++)
1053010681 {
....@@ -10538,8 +10689,8 @@
1053810689
1053910690 // if (parentcam != renderCamera) // not a light
1054010691 if (cam != lightCamera)
10541
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10542
- LA.matConcat(parentcam.fromParent, matrix, matrix);
10692
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
10693
+ LA.matConcat(parentcam.GlobalTransformInv(), matrix, matrix);
1054310694
1054410695 //LA.matConcat(cam.fromScreen, parentcam.fromParent, matrix);
1054510696
....@@ -10798,7 +10949,16 @@
1079810949 // Bump noise
1079910950 gl.glActiveTexture(GL.GL_TEXTURE6);
1080010951 //gl.glBindTexture(GL.GL_TEXTURE_2D, bump_noise);
10801
- BindTexture(NOISE_TEXTURE, false, 2);
10952
+
10953
+ try
10954
+ {
10955
+ BindTexture(NOISE_TEXTURE, false, 2);
10956
+ }
10957
+ catch (Exception e)
10958
+ {
10959
+ System.err.println("FAILED: " + NOISE_TEXTURE);
10960
+ }
10961
+
1080210962
1080310963 gl.glActiveTexture(GL.GL_TEXTURE0);
1080410964 gl.glEnable(GL.GL_TEXTURE_2D);
....@@ -10923,8 +11083,8 @@
1092311083 System.err.println("parentcam != renderCamera");
1092411084
1092511085 // if (cam != lightCamera)
10926
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10927
- LA.xformDir(lightposition, parentcam.toParent, lightposition); // may 2013
11086
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
11087
+ LA.xformDir(lightposition, parentcam.GlobalTransform(), lightposition); // may 2013
1092811088 }
1092911089
1093011090 LA.xformDir(lightposition, cam.toScreen, lightposition);
....@@ -10945,8 +11105,8 @@
1094511105 if (true) // TODO
1094611106 {
1094711107 if (cam != lightCamera)
10948
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10949
- LA.xformDir(light0, parentcam.toParent, light0); // may 2013
11108
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
11109
+ LA.xformDir(light0, parentcam.GlobalTransform(), light0); // may 2013
1095011110 }
1095111111
1095211112 LA.xformPos(light0, cam.toScreen, light0);
....@@ -11354,7 +11514,14 @@
1135411514
1135511515 usedtextures.clear();
1135611516
11357
- BindTextures(DEFAULT_TEXTURES, 2);
11517
+ try
11518
+ {
11519
+ BindTextures(DEFAULT_TEXTURES, 2);
11520
+ }
11521
+ catch (Exception e)
11522
+ {
11523
+ System.err.println("FAILED: " + DEFAULT_TEXTURES);
11524
+ }
1135811525 }
1135911526 //System.out.println("--> " + stackdepth);
1136011527 // GrafreeD.traceon();
....@@ -11445,7 +11612,14 @@
1144511612 if (checker != null && DrawMode() == DEFAULT)
1144611613 {
1144711614 //BindTexture(IMMORTAL_TEXTURE);
11448
- BindTextures(checker.GetTextures(), checker.texres);
11615
+ try
11616
+ {
11617
+ BindTextures(checker.GetTextures(), checker.texres);
11618
+ }
11619
+ catch (Exception e)
11620
+ {
11621
+ System.err.println("FAILED: " + checker.GetTextures());
11622
+ }
1144911623 // NEAREST
1145011624 GetGL().glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); // GL.GL_LINEAR);
1145111625 DrawChecker(gl);
....@@ -11527,7 +11701,7 @@
1152711701 return;
1152811702 }
1152911703
11530
- String string = obj.GetToolTip();
11704
+ String string = obj.toString(); //.GetToolTip();
1153111705
1153211706 GL gl = GetGL();
1153311707
....@@ -11844,8 +12018,8 @@
1184412018 //obj.TransformToWorld(light, light);
1184512019 for (int i = tp.size(); --i >= 0;)
1184612020 {
11847
- for (int count = tp.get(i).GetTransformCount(); --count>=0;)
11848
- LA.xformPos(light, tp.get(i).toParent, light);
12021
+ //for (int count = tp.get(i).GetTransformCount(); --count>=0;)
12022
+ LA.xformPos(light, tp.get(i).GlobalTransform(), light);
1184912023 }
1185012024
1185112025
....@@ -11862,8 +12036,8 @@
1186212036 parentcam = cameras[0];
1186312037 }
1186412038
11865
- for (int count = parentcam.GetTransformCount(); --count>=0;)
11866
- LA.xformPos(light, parentcam.toParent, light); // may 2013
12039
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
12040
+ LA.xformPos(light, parentcam.GlobalTransform(), light); // may 2013
1186712041
1186812042 LA.xformPos(light, renderCamera.toScreen, light);
1186912043
....@@ -12477,8 +12651,8 @@
1247712651
1247812652 // display shadow only (bump == 0)
1247912653 "SUB temp.x, half.x, shadow.x;" +
12480
- "MOV temp.y, -params6.x;" +
12481
- "SLT temp.z, temp.y, zero.x;" +
12654
+ "MOV temp.y, -params5.z;" + // params6.x;" +
12655
+ "SLT temp.z, temp.y, -one2048th.x;" +
1248212656 "SUB temp.y, one.x, temp.z;" +
1248312657 "MUL temp.x, temp.x, temp.y;" +
1248412658 "KIL temp.x;" +
....@@ -12809,7 +12983,7 @@
1280912983 //once = true;
1281012984 }
1281112985
12812
- System.out.print("Program #" + mode + "; length = " + program.length());
12986
+ System.out.print("Program #" + mode + "; instructions = " + program.split(";").length + "; length = " + program.length());
1281312987 System.out.println(" - " + (mode >> 3) + " lights; " + ((mode & 2) == 2 ? "anisoUV " : "") + ((mode & 4) == 4 ? "SoftShadow " : ""));
1281412988 loadProgram(gl, GL.GL_FRAGMENT_PROGRAM_ARB, program);
1281512989
....@@ -12942,12 +13116,16 @@
1294213116
1294313117 "ADD " + depth + ".z, " + depth + ".z, temp.x;" +
1294413118 //"SUB " + depth + ".z, " + depth + ".z, temp.x;" + // back face shadowing!
13119
+
13120
+ // Compare fragment depth in light space with shadowmap.
1294513121 "SUB temp.x, fragment.texcoord[1].z, " + depth + ".z;" +
1294613122 "SGE temp.y, temp.x, zero.x;" +
12947
- "SUB " + shadow + ".y, one.x, temp.y;" +
13123
+ "SUB " + shadow + ".y, one.x, temp.y;" + // Specular is fully occluded
13124
+
13125
+ // Reverse comparison
1294813126 "SUB temp.x, one.x, temp.x;" +
1294913127 "MUL " + shadow + ".x, temp.x, temp.y;" +
12950
- "SUB " + shadow + ".x, one.x, " + shadow + ".x;" + // specular is fully occluded
13128
+ "SUB " + shadow + ".x, one.x, " + shadow + ".x;" + // diffuse
1295113129 "POW " + shadow + ".x, " + shadow + ".x, params5.z;" + // fake depth
1295213130
1295313131 "SLT " + shadow + ".z, fragment.texcoord[1].z, " + depth + ".z;" +
....@@ -12961,6 +13139,10 @@
1296113139 // No shadow for backface
1296213140 "DP3 temp.x, normal, lightd;" +
1296313141 "SLT temp.x, temp.x, zero.x;" + // shadoweps
13142
+ "LRP " + shadow + ", temp.x, one, " + shadow + ";" +
13143
+
13144
+ // No shadow when out of frustrum
13145
+ "SGE temp.x, " + depth + ".z, one.z;" +
1296413146 "LRP " + shadow + ", temp.x, one, " + shadow + ";" +
1296513147 "";
1296613148 }
....@@ -13776,9 +13958,12 @@
1377613958
1377713959 public void mouseDragged(MouseEvent e)
1377813960 {
13961
+ Globals.MOUSEDRAGGED = true;
13962
+
1377913963 //System.out.println("mouseDragged: " + e);
1378013964 if (isRenderer)
1378113965 movingcamera = true;
13966
+
1378213967 //if (drawing)
1378313968 //return;
1378413969 if ((e.getModifiersEx() & CTRL) != 0
....@@ -14340,7 +14525,10 @@
1434014525
1434114526 public void mouseReleased(MouseEvent e)
1434214527 {
14528
+ Globals.MOUSEDRAGGED = false;
14529
+
1434314530 movingcamera = false;
14531
+ X = Y = 0;
1434414532 //System.out.println("mouseReleased: " + e);
1434514533 clickEnd(e.getX(), e.getY(), e.getModifiersEx());
1434614534 }
....@@ -14870,7 +15058,7 @@
1487015058 //RESIZETEXTURE ^= true;
1487115059 //break;
1487215060 case 'z':
14873
- RENDERSHADOW ^= true;
15061
+ Globals.RENDERSHADOW ^= true;
1487415062 Globals.lighttouched = true;
1487515063 repaint();
1487615064 break;
....@@ -15349,7 +15537,9 @@
1534915537 info.bounds.setBounds(0, 0, (int) (width * zoom), (int) (height * zoom));
1535015538 //Image img = CreateImage(width, height);
1535115539 //System.out.println("width = " + width + "; height = " + height + "\n");
15540
+
1535215541 Graphics gr = g; // img.getGraphics();
15542
+
1535315543 if (!hasMarquee)
1535415544 {
1535515545 if (Xmin < Xmax) // !locked)
....@@ -15447,14 +15637,33 @@
1544715637 if (!isRenderer)
1544815638 {
1544915639 object.drawEditHandles(info, 0);
15640
+
15641
+ if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0)
15642
+ {
15643
+ switch (object.selection.get(0).hitSomething)
15644
+ {
15645
+ case Object3D.hitCenter: gr.setColor(Color.pink);
15646
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15647
+ break;
15648
+ case Object3D.hitRotate: gr.setColor(Color.yellow);
15649
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15650
+ break;
15651
+ case Object3D.hitScale: gr.setColor(Color.cyan);
15652
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15653
+ break;
15654
+ }
15655
+
15656
+ }
1545015657 }
1545115658 }
15659
+
1545215660 if (isRenderer)
1545315661 {
1545415662 //gr.setColor(Color.black);
1545515663 //gr.drawRect(info.bounds.x - 1, info.bounds.y - 1, info.bounds.width + 1, info.bounds.height + 1);
1545615664 //gr.drawRect(info.bounds.x - 2, info.bounds.y - 2, info.bounds.width + 3, info.bounds.height + 3);
1545715665 }
15666
+
1545815667 if (hasMarquee)
1545915668 {
1546015669 gr.setXORMode(Color.white);
....@@ -15861,7 +16070,7 @@
1586116070 Object3D object;
1586216071 static Object3D trackedobject;
1586316072 Camera renderCamera; // Light or Eye (or Occlusion)
15864
- /*static*/ Camera manipCamera; // Light or Eye
16073
+ /*static*/ Camera manipCamera; // Light or Eye. Can be Light when Eye, not Eye when Light
1586516074 /*static*/ Camera eyeCamera;
1586616075 /*static*/ Camera lightCamera;
1586716076 int cameracount;
....@@ -16592,7 +16801,7 @@
1659216801 gl.glDisable(gl.GL_CULL_FACE);
1659316802 }
1659416803
16595
- if (!RENDERSHADOW)
16804
+ if (!Globals.RENDERSHADOW)
1659616805 gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
1659716806
1659816807 // SB gl.glPolygonOffset(2.5f, 10);
....@@ -16602,7 +16811,7 @@
1660216811 //gl.glColorMask(false, false, false, false);
1660316812
1660416813 //render_scene_from_light_view(gl, drawable, 0, 0);
16605
- if (RENDERSHADOW && Globals.lighttouched && !movingcamera) // && !parent.IsFreezed())
16814
+ if (Globals.RENDERSHADOW && Globals.lighttouched && (!movingcamera || !Globals.FREEZEONMOVE)) // && !parent.IsFreezed())
1660616815 {
1660716816 gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
1660816817