.. | .. |
---|
29 | 29 | Object3D saveskeleton; |
---|
30 | 30 | // |
---|
31 | 31 | |
---|
32 | | - byte[] versions[]; |
---|
| 32 | + String skyboxname; |
---|
| 33 | + String skyboxext; |
---|
| 34 | + |
---|
| 35 | + Object3D versions[]; |
---|
33 | 36 | int versionindex = -1; |
---|
34 | 37 | |
---|
35 | 38 | ScriptNode scriptnode; |
---|
.. | .. |
---|
1011 | 1014 | |
---|
1012 | 1015 | if (material == null || material.multiply) |
---|
1013 | 1016 | return true; |
---|
| 1017 | + |
---|
| 1018 | + if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
| 1019 | + return false; |
---|
1014 | 1020 | |
---|
1015 | 1021 | // Transparent objects are dynamic because we have to sort the triangles. |
---|
1016 | 1022 | return material.opacity > 0.99; |
---|
.. | .. |
---|
5906 | 5912 | if (support != null) |
---|
5907 | 5913 | support = support; |
---|
5908 | 5914 | |
---|
5909 | | - //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
5910 | | - boolean usecalllists = false; //!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. |
---|
5911 | 5919 | |
---|
5912 | 5920 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5913 | 5921 | { |
---|
.. | .. |
---|
5917 | 5925 | // usecalllists &= !(parent instanceof RandomNode); |
---|
5918 | 5926 | // usecalllists = false; |
---|
5919 | 5927 | |
---|
5920 | | - if (GetBRep() != null) |
---|
5921 | | - usecalllists = usecalllists; |
---|
| 5928 | + if (display.DrawMode() == display.SHADOW) |
---|
| 5929 | + //GetBRep() != null) |
---|
| 5930 | + usecalllists = !!usecalllists; |
---|
5922 | 5931 | //System.out.println("draw " + this); |
---|
5923 | 5932 | //new Exception().printStackTrace(); |
---|
5924 | 5933 | |
---|
.. | .. |
---|
5940 | 5949 | if (!(this instanceof Composite)) |
---|
5941 | 5950 | touched = false; |
---|
5942 | 5951 | //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 |
---|
5944 | 5953 | { |
---|
5945 | 5954 | bRep.displaylist = display.GenList(); |
---|
5946 | 5955 | assert(bRep.displaylist != 0); |
---|
.. | .. |
---|
5951 | 5960 | |
---|
5952 | 5961 | //System.out.println("\tnew list " + list); |
---|
5953 | 5962 | //gl.glDrawBuffer(gl.GL_NONE); |
---|
5954 | | - if (usecalllists) |
---|
| 5963 | + if (usecalllists && bRep.displaylist > 0) |
---|
5955 | 5964 | { |
---|
5956 | 5965 | // System.err.println("new list " + bRep.displaylist + " for " + this); |
---|
5957 | 5966 | display.NewList(bRep.displaylist); |
---|
.. | .. |
---|
5960 | 5969 | CallList(display, root, selected, blocked); |
---|
5961 | 5970 | |
---|
5962 | 5971 | // compiled = true; |
---|
5963 | | - if (usecalllists) |
---|
| 5972 | + if (usecalllists && bRep.displaylist > 0) |
---|
5964 | 5973 | { |
---|
5965 | 5974 | // System.err.println("end list " + bRep.displaylist + " for " + this); |
---|
5966 | 5975 | display.EndList(); |
---|
.. | .. |
---|
7490 | 7499 | hitSomething = hitScale; |
---|
7491 | 7500 | |
---|
7492 | 7501 | 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; |
---|
7494 | 7503 | double sign = 1; |
---|
7495 | 7504 | if (hScale < 0) |
---|
7496 | 7505 | { |
---|
.. | .. |
---|
7502 | 7511 | //hScale = 0.01; |
---|
7503 | 7512 | } |
---|
7504 | 7513 | |
---|
7505 | | - double vScale = (double) (clickInfo.y /*- centerPt.y*/) / 32; |
---|
| 7514 | + double vScale = (double) (clickInfo.y - centerPt.y) / 32; |
---|
7506 | 7515 | sign = 1; |
---|
7507 | 7516 | if (vScale < 0) |
---|
7508 | 7517 | { |
---|
.. | .. |
---|
7717 | 7726 | break; |
---|
7718 | 7727 | |
---|
7719 | 7728 | case hitScale: // scale |
---|
7720 | | - double hScale = (double) (clickInfo.x /*- centerPt.x*/) / 32; |
---|
| 7729 | + double hScale = (double) (clickInfo.x - centerPt.x) / 32; |
---|
7721 | 7730 | double sign = 1; |
---|
7722 | 7731 | if (hScale < 0) |
---|
7723 | 7732 | { |
---|
.. | .. |
---|
7729 | 7738 | //hScale = 0.01; |
---|
7730 | 7739 | } |
---|
7731 | 7740 | |
---|
7732 | | - double vScale = (double) (clickInfo.y /*- centerPt.y*/) / 32; |
---|
| 7741 | + double vScale = (double) (clickInfo.y - centerPt.y) / 32; |
---|
7733 | 7742 | sign = 1; |
---|
7734 | 7743 | if (vScale < 0) |
---|
7735 | 7744 | { |
---|