diff options
author | phil <[email protected]> | 2016-11-30 16:12:08 +1300 |
---|---|---|
committer | phil <[email protected]> | 2016-11-30 16:12:08 +1300 |
commit | 6b77f69d98c2ec28de98c136457cb35f15ec7a0a (patch) | |
tree | ab508a938d019905dfa913ad232a954f4c8fd469 | |
parent | 494aa4f3c81ea1d6da6ff8c4f8d3e317985741b5 (diff) |
Lightwave and Objectfile loader now return nio geometry arrays
For performance
-rw-r--r-- | src/main/java/org/jogamp/java3d/loaders/lw3d/J3dLwoParser.java | 3 | ||||
-rw-r--r-- | src/main/java/org/jogamp/java3d/loaders/objectfile/ObjectFile.java | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/jogamp/java3d/loaders/lw3d/J3dLwoParser.java b/src/main/java/org/jogamp/java3d/loaders/lw3d/J3dLwoParser.java index 4ffe5d3..0d707f1 100644 --- a/src/main/java/org/jogamp/java3d/loaders/lw3d/J3dLwoParser.java +++ b/src/main/java/org/jogamp/java3d/loaders/lw3d/J3dLwoParser.java @@ -229,7 +229,8 @@ class J3dLwoParser extends LwoParser { ng.generateNormals(gi); Stripifier st = new Stripifier(); st.stripify(gi); - object = gi.getGeometryArray(true, true, false); + //PJ nio is much faster + object = gi.getGeometryArray(true, true, true); debugOutputLn(LINE_TRACE, "done."); } else { diff --git a/src/main/java/org/jogamp/java3d/loaders/objectfile/ObjectFile.java b/src/main/java/org/jogamp/java3d/loaders/objectfile/ObjectFile.java index 4792fc2..abbc2e4 100644 --- a/src/main/java/org/jogamp/java3d/loaders/objectfile/ObjectFile.java +++ b/src/main/java/org/jogamp/java3d/loaders/objectfile/ObjectFile.java @@ -1181,8 +1181,8 @@ public class ObjectFile implements Loader { // Put geometry into Shape3d Shape3D shape = new Shape3D(); // issue 638; default to BY_COPY for consistency - //PJ: gl2es2 requires by ref - shape.setGeometry(gi.getGeometryArray(true, false, false)); + //PJ: gl2es2 requires by ref, and nio is much faster + shape.setGeometry(gi.getGeometryArray(true, false, true)); String matName = (String)groupMaterials.get(curname); materials.assignMaterial(matName, shape); |