.. | .. |
---|
32 | 32 | String skyboxname; |
---|
33 | 33 | String skyboxext; |
---|
34 | 34 | |
---|
35 | | - byte[] versions[]; |
---|
| 35 | + Object3D versions[]; |
---|
36 | 36 | int versionindex = -1; |
---|
37 | 37 | |
---|
38 | 38 | ScriptNode scriptnode; |
---|
.. | .. |
---|
1014 | 1014 | |
---|
1015 | 1015 | if (material == null || material.multiply) |
---|
1016 | 1016 | return true; |
---|
| 1017 | + |
---|
| 1018 | + if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
| 1019 | + return false; |
---|
1017 | 1020 | |
---|
1018 | 1021 | // Transparent objects are dynamic because we have to sort the triangles. |
---|
1019 | 1022 | return material.opacity > 0.99; |
---|
.. | .. |
---|
5909 | 5912 | if (support != null) |
---|
5910 | 5913 | support = support; |
---|
5911 | 5914 | |
---|
5912 | | - //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
5913 | | - 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. |
---|
5914 | 5919 | |
---|
5915 | 5920 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5916 | 5921 | { |
---|
.. | .. |
---|
5920 | 5925 | // usecalllists &= !(parent instanceof RandomNode); |
---|
5921 | 5926 | // usecalllists = false; |
---|
5922 | 5927 | |
---|
5923 | | - if (GetBRep() != null) |
---|
5924 | | - usecalllists = usecalllists; |
---|
| 5928 | + if (display.DrawMode() == display.SHADOW) |
---|
| 5929 | + //GetBRep() != null) |
---|
| 5930 | + usecalllists = !!usecalllists; |
---|
5925 | 5931 | //System.out.println("draw " + this); |
---|
5926 | 5932 | //new Exception().printStackTrace(); |
---|
5927 | 5933 | |
---|
.. | .. |
---|
5943 | 5949 | if (!(this instanceof Composite)) |
---|
5944 | 5950 | touched = false; |
---|
5945 | 5951 | //if (displaylist == -1 && usecalllists) |
---|
5946 | | - if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013 |
---|
| 5952 | + if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013 |
---|
5947 | 5953 | { |
---|
5948 | 5954 | bRep.displaylist = display.GenList(); |
---|
5949 | 5955 | assert(bRep.displaylist != 0); |
---|
.. | .. |
---|
5954 | 5960 | |
---|
5955 | 5961 | //System.out.println("\tnew list " + list); |
---|
5956 | 5962 | //gl.glDrawBuffer(gl.GL_NONE); |
---|
5957 | | - if (usecalllists) |
---|
| 5963 | + if (usecalllists && bRep.displaylist > 0) |
---|
5958 | 5964 | { |
---|
5959 | 5965 | // System.err.println("new list " + bRep.displaylist + " for " + this); |
---|
5960 | 5966 | display.NewList(bRep.displaylist); |
---|
.. | .. |
---|
5963 | 5969 | CallList(display, root, selected, blocked); |
---|
5964 | 5970 | |
---|
5965 | 5971 | // compiled = true; |
---|
5966 | | - if (usecalllists) |
---|
| 5972 | + if (usecalllists && bRep.displaylist > 0) |
---|
5967 | 5973 | { |
---|
5968 | 5974 | // System.err.println("end list " + bRep.displaylist + " for " + this); |
---|
5969 | 5975 | display.EndList(); |
---|