Normand Briere
2019-08-01 c49ad213b600f844e9070cb09390c3e6d3d13db4
Object3D.java
....@@ -29,7 +29,10 @@
2929 Object3D saveskeleton;
3030 //
3131
32
- byte[] versions[];
32
+ String skyboxname;
33
+ String skyboxext;
34
+
35
+ Object3D versions[];
3336 int versionindex = -1;
3437
3538 ScriptNode scriptnode;
....@@ -1011,6 +1014,9 @@
10111014
10121015 if (material == null || material.multiply)
10131016 return true;
1017
+
1018
+ if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000)
1019
+ return false;
10141020
10151021 // Transparent objects are dynamic because we have to sort the triangles.
10161022 return material.opacity > 0.99;
....@@ -5906,8 +5912,10 @@
59065912 if (support != null)
59075913 support = support;
59085914
5909
- //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5910
- boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5915
+ boolean usecalllists = !IsLive() && IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5916
+ //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5917
+
5918
+ //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass.
59115919
59125920 if (!usecalllists && bRep != null && bRep.displaylist > 0)
59135921 {
....@@ -5917,8 +5925,9 @@
59175925 // usecalllists &= !(parent instanceof RandomNode);
59185926 // usecalllists = false;
59195927
5920
- if (GetBRep() != null)
5921
- usecalllists = usecalllists;
5928
+ if (display.DrawMode() == display.SHADOW)
5929
+ //GetBRep() != null)
5930
+ usecalllists = !!usecalllists;
59225931 //System.out.println("draw " + this);
59235932 //new Exception().printStackTrace();
59245933
....@@ -5940,7 +5949,7 @@
59405949 if (!(this instanceof Composite))
59415950 touched = false;
59425951 //if (displaylist == -1 && usecalllists)
5943
- if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013
5952
+ if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013
59445953 {
59455954 bRep.displaylist = display.GenList();
59465955 assert(bRep.displaylist != 0);
....@@ -5951,7 +5960,7 @@
59515960
59525961 //System.out.println("\tnew list " + list);
59535962 //gl.glDrawBuffer(gl.GL_NONE);
5954
- if (usecalllists)
5963
+ if (usecalllists && bRep.displaylist > 0)
59555964 {
59565965 // System.err.println("new list " + bRep.displaylist + " for " + this);
59575966 display.NewList(bRep.displaylist);
....@@ -5960,7 +5969,7 @@
59605969 CallList(display, root, selected, blocked);
59615970
59625971 // compiled = true;
5963
- if (usecalllists)
5972
+ if (usecalllists && bRep.displaylist > 0)
59645973 {
59655974 // System.err.println("end list " + bRep.displaylist + " for " + this);
59665975 display.EndList();
....@@ -7490,7 +7499,7 @@
74907499 hitSomething = hitScale;
74917500
74927501 double scale = 0.005f * clickInfo.camera.Distance();
7493
- double hScale = (double) (clickInfo.x /*- centerPt.x*/) / 32;
7502
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
74947503 double sign = 1;
74957504 if (hScale < 0)
74967505 {
....@@ -7502,7 +7511,7 @@
75027511 //hScale = 0.01;
75037512 }
75047513
7505
- double vScale = (double) (clickInfo.y /*- centerPt.y*/) / 32;
7514
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
75067515 sign = 1;
75077516 if (vScale < 0)
75087517 {
....@@ -7717,7 +7726,7 @@
77177726 break;
77187727
77197728 case hitScale: // scale
7720
- double hScale = (double) (clickInfo.x /*- centerPt.x*/) / 32;
7729
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
77217730 double sign = 1;
77227731 if (hScale < 0)
77237732 {
....@@ -7729,7 +7738,7 @@
77297738 //hScale = 0.01;
77307739 }
77317740
7732
- double vScale = (double) (clickInfo.y /*- centerPt.y*/) / 32;
7741
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
77337742 sign = 1;
77347743 if (vScale < 0)
77357744 {