From 6b77f69d98c2ec28de98c136457cb35f15ec7a0a Mon Sep 17 00:00:00 2001 From: phil Date: Wed, 30 Nov 2016 16:12:08 +1300 Subject: Lightwave and Objectfile loader now return nio geometry arrays For performance --- src/main/java/org/jogamp/java3d/loaders/lw3d/J3dLwoParser.java | 3 ++- 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); -- cgit v1.2.3