From 3ee9493a86109a5331bed939586afb60a0ebdef0 Mon Sep 17 00:00:00 2001 From: phil Date: Tue, 20 Dec 2016 10:51:09 +1300 Subject: Code changes as suggested by gouessej One functional code change in the VersionInfo template The SparseArray comments not changed to ensure maximum similarity with original --- src/main/java-templates/org/jogamp/java3d/VersionInfo.java | 2 +- src/main/java/org/jogamp/java3d/NodeComponentRetained.java | 2 +- .../java/org/jogamp/java3d/ShaderAttributeSetRetained.java | 13 ------------- src/main/java/org/jogamp/java3d/Shape3DRetained.java | 5 +---- 4 files changed, 3 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/main/java-templates/org/jogamp/java3d/VersionInfo.java b/src/main/java-templates/org/jogamp/java3d/VersionInfo.java index 46b6c45..36de115 100644 --- a/src/main/java-templates/org/jogamp/java3d/VersionInfo.java +++ b/src/main/java-templates/org/jogamp/java3d/VersionInfo.java @@ -326,7 +326,7 @@ class VersionInfo extends Object { * @return the implementation version string */ static String getVersionFull() { - return VERSION; + return VERSION_FULL; } /** diff --git a/src/main/java/org/jogamp/java3d/NodeComponentRetained.java b/src/main/java/org/jogamp/java3d/NodeComponentRetained.java index b209866..a75e70b 100644 --- a/src/main/java/org/jogamp/java3d/NodeComponentRetained.java +++ b/src/main/java/org/jogamp/java3d/NodeComponentRetained.java @@ -156,7 +156,7 @@ class NodeComponentRetained extends SceneGraphObjectRetained { } // the reverse order does not appear to be compulsory - // cahnge from ArayList to LinkedHashMap prevents ordered traversal + // change from ArrayList to LinkedHashMap prevents ordered traversal for (NodeRetained nr : users) nr.notifySceneGraphChanged(false); //for (int i=users.size()-1; i >=0; i--) { diff --git a/src/main/java/org/jogamp/java3d/ShaderAttributeSetRetained.java b/src/main/java/org/jogamp/java3d/ShaderAttributeSetRetained.java index b81e415..e3325fb 100644 --- a/src/main/java/org/jogamp/java3d/ShaderAttributeSetRetained.java +++ b/src/main/java/org/jogamp/java3d/ShaderAttributeSetRetained.java @@ -69,10 +69,7 @@ private Map attrs = new HashMap getAttrValues() { @Override void setLive(boolean backgroundGroup, int refCount) { - // System.err.println("ShaderAttributeSetRetained.setLive()"); ShaderAttributeRetained[] sAttrsRetained = new ShaderAttributeRetained[attrs.size()]; sAttrsRetained = attrs.values().toArray(sAttrsRetained); for(int i=0; i < sAttrsRetained.length; i++) { @@ -277,7 +273,6 @@ List< ShaderAttributeRetained> getAttrValues() { @Override void clearLive(int refCount) { - // System.err.println("ShaderAttributeSetRetained.clearLive()"); super.clearLive(refCount); @@ -290,7 +285,6 @@ List< ShaderAttributeRetained> getAttrValues() { @Override synchronized void createMirrorObject() { - // System.err.println("ShaderAttributeSetRetained : createMirrorObject"); // This method should only call by setLive(). if (mirror == null) { ShaderAttributeSetRetained mirrorSAS = new ShaderAttributeSetRetained(); @@ -321,24 +315,19 @@ List< ShaderAttributeRetained> getAttrValues() { @Override synchronized void updateMirrorObject(int component, Object value) { - // System.err.println("ShaderAttributeSetRetained : updateMirrorObject"); - ShaderAttributeSetRetained mirrorSAS = (ShaderAttributeSetRetained)mirror; if ((component & ShaderConstants.ATTRIBUTE_SET_PUT) != 0) { - // System.err.println(" -- ATTRIBUTE_SET_PUT"); ShaderAttributeRetained mirrorSA = (ShaderAttributeRetained)value; assert(mirrorSA != null); ((ShaderAttributeSetRetained)mirror).attrs.put(mirrorSA.attrName, mirrorSA); ((ShaderAttributeSetRetained)mirror).attrsValues.add(mirrorSA); } else if((component & ShaderConstants.ATTRIBUTE_SET_REMOVE) != 0) { - // System.err.println(" -- ATTRIBUTE_SET_REMOVE"); ((ShaderAttributeSetRetained)mirror).attrsValues.remove(((ShaderAttributeSetRetained)mirror).attrs.remove((String)value)); } else if((component & ShaderConstants.ATTRIBUTE_SET_CLEAR) != 0) { - // System.err.println(" -- ATTRIBUTE_SET_CLEAR"); ((ShaderAttributeSetRetained)mirror).attrs.clear(); ((ShaderAttributeSetRetained)mirror).attrsValues.clear(); } @@ -361,11 +350,9 @@ List< ShaderAttributeRetained> getAttrValues() { createMessage.args[0] = this; createMessage.args[1]= new Integer(attrMask); createMessage.args[2] = attr; - // System.err.println("changedFreqent1 = "+changedFrequent); createMessage.args[3] = new Integer(changedFrequent); VirtualUniverse.mc.processMessage(createMessage); - // System.err.println("univList.size is " + univList.size()); for(int i=0; i> getGeomAtomsList(LinkedHashSet=0; i--) { - //ms = (Shape3DRetained) userList.get(i); for(NodeRetained nr : userList){ ms = (Shape3DRetained)nr; if(moreThanOneUniv == false) { @@ -2484,8 +2482,7 @@ final static ArrayList> getGeomAtomsList(LinkedHashSet