Browse Source

Merge branch 'master' of https://github.com/jMonkeyEngine/sdk

Dokthar 9 years ago
parent
commit
26a435d428
63 changed files with 6863 additions and 243 deletions
  1. 1 0
      BasicGameTemplate/nbproject/project.properties
  2. 1 1
      build.gradle
  3. 38 0
      docs/development.md
  4. 31 27
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeMotionEvent.java
  5. 64 58
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeMotionPath.java
  6. 9 4
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeMotionPathChildren.java
  7. 85 67
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeVector3f.java
  8. 54 45
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeVector3fChildren.java
  9. 45 6
      jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyLookAndFeel.java
  10. 53 0
      jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/components/MenuBarUI.java
  11. 5 5
      jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-glsl-token.xml
  12. 3 1
      jme3-desktop-executables/src/com/jme3/gde/desktop/executables/Bundle.properties
  13. 11 8
      jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCompositeProvider.java
  14. 27 1
      jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCustomizerPanel.form
  15. 32 7
      jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCustomizerPanel.java
  16. 29 10
      jme3-desktop-executables/src/com/jme3/gde/desktop/executables/JreDownloader.java
  17. 178 0
      jme3-ios/build.xml
  18. 82 0
      jme3-ios/ios-data/templates/ios.properties
  19. 391 0
      jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/project.pbxproj
  20. 7 0
      jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  21. BIN
      jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/project.xcworkspace/xcuserdata/normenhansen.xcuserdatad/UserInterfaceState.xcuserstate
  22. 10 0
      jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/project.xcworkspace/xcuserdata/normenhansen.xcuserdatad/WorkspaceSettings.xcsettings
  23. 86 0
      jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/xcuserdata/normenhansen.xcuserdatad/xcschemes/hello.xcscheme
  24. 22 0
      jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/xcuserdata/normenhansen.xcuserdatad/xcschemes/xcschememanagement.plist
  25. 2 0
      jme3-ios/ios-data/templates/project/jme-ios/en.lproj/InfoPlist.strings
  26. 252 0
      jme3-ios/ios-data/templates/project/jme-ios/iPad/en.lproj/MainWindow_iPad.xib
  27. 5 0
      jme3-ios/ios-data/templates/project/jme-ios/iPad/jmeAppDelegate_iPad.h
  28. 5 0
      jme3-ios/ios-data/templates/project/jme-ios/iPad/jmeAppDelegate_iPad.m
  29. 258 0
      jme3-ios/ios-data/templates/project/jme-ios/iPhone/en.lproj/MainWindow_iPhone.xib
  30. 5 0
      jme3-ios/ios-data/templates/project/jme-ios/iPhone/jmeAppDelegate_iPhone.h
  31. 5 0
      jme3-ios/ios-data/templates/project/jme-ios/iPhone/jmeAppDelegate_iPhone.m
  32. 47 0
      jme3-ios/ios-data/templates/project/jme-ios/jme-ios-Info.plist
  33. 14 0
      jme3-ios/ios-data/templates/project/jme-ios/jme-ios-Prefix.pch
  34. 26 0
      jme3-ios/ios-data/templates/project/jme-ios/jmeAppDelegate.h
  35. 319 0
      jme3-ios/ios-data/templates/project/jme-ios/jmeAppDelegate.m
  36. 1 0
      jme3-ios/ios-data/templates/project/jme-ios/logging.properties
  37. 9 0
      jme3-ios/ios-data/templates/project/jme-ios/main.m
  38. 122 0
      jme3-ios/ios-data/templates/src/JmeAppHarness.java
  39. 60 0
      jme3-ios/ios-data/templates/src/JmeAppHarness.m
  40. 1944 0
      jme3-ios/ios-data/templates/src/JmeIosGLES.m
  41. 41 0
      jme3-ios/ios-data/templates/src/boot.c
  42. 477 0
      jme3-ios/ios-data/templates/src/com_jme3_audio_android_AndroidOpenALSoftAudioRenderer.c
  43. 319 0
      jme3-ios/ios-data/templates/src/com_jme3_audio_android_AndroidOpenALSoftAudioRenderer.h
  44. 143 0
      jme3-ios/ios-data/templates/src/jme-ios.m
  45. 402 0
      jme3-ios/licenses.txt
  46. 6 0
      jme3-ios/manifest.mf
  47. 45 0
      jme3-ios/nbproject/build-impl.xml
  48. 8 0
      jme3-ios/nbproject/genfiles.properties
  49. 11 0
      jme3-ios/nbproject/project.properties
  50. 88 0
      jme3-ios/nbproject/project.xml
  51. 1 0
      jme3-ios/nbproject/suite.properties
  52. 7 0
      jme3-ios/src/com/jme3/gde/ios/Bundle.properties
  53. 58 0
      jme3-ios/src/com/jme3/gde/ios/IosImportantFiles.java
  54. 85 0
      jme3-ios/src/com/jme3/gde/ios/IosTool.java
  55. BIN
      jme3-ios/src/com/jme3/gde/ios/ios-data.zip
  56. 233 0
      jme3-ios/src/com/jme3/gde/ios/ios-targets.xml
  57. 4 0
      jme3-ios/src/com/jme3/gde/ios/layer.xml
  58. 9 0
      jme3-ios/src/com/jme3/gde/ios/panel/Bundle.properties
  59. 214 0
      jme3-ios/src/com/jme3/gde/ios/panel/IosCompositeProvider.java
  60. 143 0
      jme3-ios/src/com/jme3/gde/ios/panel/IosCustomizerPanel.form
  61. 193 0
      jme3-ios/src/com/jme3/gde/ios/panel/IosCustomizerPanel.java
  62. 1 1
      license-jme.txt
  63. 37 2
      nbproject/project.properties

+ 1 - 0
BasicGameTemplate/nbproject/project.properties

@@ -66,6 +66,7 @@ javadoc.use=true
 javadoc.version=false
 javadoc.version=false
 javadoc.windowtitle=
 javadoc.windowtitle=
 jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
 jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
+jme.project.version=3.1
 jnlp.codebase.type=local
 jnlp.codebase.type=local
 jnlp.descriptor=application
 jnlp.descriptor=application
 jnlp.enabled=false
 jnlp.enabled=false

+ 1 - 1
build.gradle

@@ -22,7 +22,7 @@ repositories {
 
 
 }
 }
 
 
-ext.jmeFullVersion = "3.1.0-SNAPSHOT" // 3.1.0-alpha3
+ext.jmeFullVersion = "3.1.0-alpha3" //"3.1.0-SNAPSHOT" 
 ext.jmeNbmRevision = 0
 ext.jmeNbmRevision = 0
 
 
 configurations {
 configurations {

+ 38 - 0
docs/development.md

@@ -0,0 +1,38 @@
+# Developing for the SDK  
+
+This document is intended to be a loose collection of stuff which is not formatted/complete enough to be added into the Wiki.  
+
+### List of Links for the Nodes API
+http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html  
+http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html  
+http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Sheet.html  
+  
+https://platform.netbeans.org/tutorials/nbm-nodesapi2.html  
+http://wiki.netbeans.org/BasicUnderstandingOfTheNetBeansNodesAPI  
+  
+Make Nodes Drag and Droppable / Moving Up and Down  
+https://blogs.oracle.com/geertjan/entry/node_cut_copy_paste_delete  
+https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.1/misc/DragDrop  
+https://blogs.oracle.com/geertjan/entry/how_users_can_let_children  
+https://blogs.oracle.com/geertjan/entry/how_users_can_let_children1  
+
+Node Children:  
+http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Children.html  
+http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Children.Array.html  
+http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Children.Keys.html  
+http://bits.netbeans.org/8.0/javadoc/org-openide-nodes/org/openide/nodes/Index.html  
+
+Why are my Nodes undeleteable? (Keys were regenerated)  
+https://netbeans.org/projects/platform/lists/dev/archive/2008-07/message/256 
+
+Random Exception when resetting keys (When the hashCode of a key changes):  
+https://huionn.wordpress.com/2012/08/20/api-design-defensive-and-explanatory-error-message/  
+  
+https://blogs.oracle.com/geertjan/entry/lookuplistener_children_keys  
+
+### Dark Monkey
+Dark Monkey is based on Nimrod Look and Feel so see [here](http://nilogonzalez.es/nimrodlf/download-en.html) to download it's source and Subclass whatever is needed. Nimrod also comes with those Icons (which are a bit low res, though.)  
+See [here](https://github.com/frohoff/jdk8u-dev-jdk/blob/master/src/macosx/classes/com/apple/laf/AquaMenuBarUI.java) for AquaMenuBarUI (Apple's Centralized Menu Bar). The Plan was to have Dark Monkey use this bar, but it doesn't work since we can't have those com.apple.laf packages as dependency atm, so Reflection would be needed.
+
+### Own FileTypes (Syntax Highlighting)
+https://platform.netbeans.org/tutorials/nbm-mfsyntax.html  

+ 31 - 27
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeMotionEvent.java

@@ -34,7 +34,6 @@ package com.jme3.gde.core.sceneexplorer.nodes;
 import com.jme3.cinematic.events.AbstractCinematicEvent;
 import com.jme3.cinematic.events.AbstractCinematicEvent;
 import com.jme3.cinematic.events.MotionEvent;
 import com.jme3.cinematic.events.MotionEvent;
 import com.jme3.gde.core.icons.IconList;
 import com.jme3.gde.core.icons.IconList;
-import com.jme3.gde.core.scene.SceneApplication;
 import java.awt.Image;
 import java.awt.Image;
 import java.io.IOException;
 import java.io.IOException;
 import org.openide.loaders.DataObject;
 import org.openide.loaders.DataObject;
@@ -44,12 +43,13 @@ import org.openide.nodes.Sheet;
 
 
 /**
 /**
  * This is the SceneExplorer Node (Display Component Class) for Motion Events
  * This is the SceneExplorer Node (Display Component Class) for Motion Events
+ *
  * @author MeFisto94
  * @author MeFisto94
  */
  */
-
 @org.openide.util.lookup.ServiceProvider(service = SceneExplorerNode.class)
 @org.openide.util.lookup.ServiceProvider(service = SceneExplorerNode.class)
 @SuppressWarnings({"unchecked", "rawtypes", "LeakingThisInConstructor"})
 @SuppressWarnings({"unchecked", "rawtypes", "LeakingThisInConstructor"})
 public class JmeMotionEvent extends JmeControl {
 public class JmeMotionEvent extends JmeControl {
+
     private MotionEvent motionEvent;
     private MotionEvent motionEvent;
     private static Image smallImage = IconList.motionEvent.getImage();
     private static Image smallImage = IconList.motionEvent.getImage();
 
 
@@ -61,7 +61,7 @@ public class JmeMotionEvent extends JmeControl {
         super(children, dataObject);
         super(children, dataObject);
         this.motionEvent = motionEvent;
         this.motionEvent = motionEvent;
         control = motionEvent; // to have JmeControl work
         control = motionEvent; // to have JmeControl work
-        
+
         lookupContents.add(this);
         lookupContents.add(this);
         lookupContents.add(control);
         lookupContents.add(control);
         lookupContents.add(children);
         lookupContents.add(children);
@@ -81,45 +81,48 @@ public class JmeMotionEvent extends JmeControl {
     }
     }
 
 
     /**
     /**
-     * This method creates the Property Sheet (i.e. the Contents for the Properties Editor)
-     * See {@link AbstractNode#createSheet() } for more information
-     * @return 
+     * This method creates the Property Sheet (i.e. the Contents for the
+     * Properties Editor).<br>See {@link AbstractNode#createSheet() } for more
+     * information
+     *
+     * @return The created Property Sheet
      */
      */
     @Override
     @Override
     protected Sheet createSheet() {
     protected Sheet createSheet() {
         Sheet sheet = new Sheet(); // Sheet.createDefault(); // Create a sheet with an empty set.
         Sheet sheet = new Sheet(); // Sheet.createDefault(); // Create a sheet with an empty set.
-        
+
         Sheet.Set abstractSet = Sheet.createPropertiesSet();
         Sheet.Set abstractSet = Sheet.createPropertiesSet();
         abstractSet.setName("AbstractCinematicEvent");
         abstractSet.setName("AbstractCinematicEvent");
         abstractSet.setDisplayName("Abstract Cinematic Event (Superclass)");
         abstractSet.setDisplayName("Abstract Cinematic Event (Superclass)");
         abstractSet.setShortDescription("This is the Superclass of MotionEvent: The Abstract Cinematic Event");
         abstractSet.setShortDescription("This is the Superclass of MotionEvent: The Abstract Cinematic Event");
-        
+
         createFields(AbstractCinematicEvent.class, abstractSet, motionEvent);
         createFields(AbstractCinematicEvent.class, abstractSet, motionEvent);
         sheet.put(abstractSet);
         sheet.put(abstractSet);
-        
+
         Sheet.Set set = Sheet.createPropertiesSet(); // Create a Properties "Set"/Entry for that Sheet. (A category so to say)
         Sheet.Set set = Sheet.createPropertiesSet(); // Create a Properties "Set"/Entry for that Sheet. (A category so to say)
         set.setDisplayName("Motion Event");
         set.setDisplayName("Motion Event");
         set.setShortDescription("These are the Properties of this Motion Event");
         set.setShortDescription("These are the Properties of this Motion Event");
         set.setName(MotionEvent.class.getName());
         set.setName(MotionEvent.class.getName());
-        
+
         MotionEvent obj = motionEvent;
         MotionEvent obj = motionEvent;
         if (obj == null) {
         if (obj == null) {
             return sheet;
             return sheet;
         }
         }
-        
+
         createFields(MotionEvent.class, set, obj);
         createFields(MotionEvent.class, set, obj);
         set.remove("Spatial"); // since we're a Control we don't set that value, we just belong to it.
         set.remove("Spatial"); // since we're a Control we don't set that value, we just belong to it.
         set.remove("Path");
         set.remove("Path");
-        
+
         sheet.put(set);
         sheet.put(set);
-        
+
         return sheet;
         return sheet;
 
 
     }
     }
 
 
     /**
     /**
-     * Returns the class of the underlying Object of this Node.
-     * This is how we are related to things found in the SceneGraph
+     * Returns the class of the underlying Object of this Node.<br>This is how we
+     * are related to things found in the SceneGraph
+     *
      * @return {@link Class}
      * @return {@link Class}
      */
      */
     @Override
     @Override
@@ -129,6 +132,7 @@ public class JmeMotionEvent extends JmeControl {
 
 
     /**
     /**
      * Returns the class of this Node
      * Returns the class of this Node
+     *
      * @return {@link Class}
      * @return {@link Class}
      */
      */
     @Override
     @Override
@@ -139,16 +143,16 @@ public class JmeMotionEvent extends JmeControl {
     public MotionEvent getMotionEvent() {
     public MotionEvent getMotionEvent() {
         return motionEvent;
         return motionEvent;
     }
     }
-            
+
     @Override
     @Override
     public org.openide.nodes.Node[] createNodes(Object key, DataObject key2, boolean cookie) {
     public org.openide.nodes.Node[] createNodes(Object key, DataObject key2, boolean cookie) {
         JmeMotionPathChildren children = new JmeMotionPathChildren();
         JmeMotionPathChildren children = new JmeMotionPathChildren();
         children.setReadOnly(cookie);
         children.setReadOnly(cookie);
-        return new org.openide.nodes.Node[] { new JmeMotionEvent((MotionEvent) key, key2, children).setReadOnly(cookie) }; // If we would return null here, we would have the JmeControl default (i.e. auto-exposure of properties, no icon but also no createSheet method)
+        return new org.openide.nodes.Node[]{new JmeMotionEvent((MotionEvent) key, key2, children).setReadOnly(cookie)}; // If we would return null here, we would have the JmeControl default (i.e. auto-exposure of properties, no icon but also no createSheet method)
     }
     }
-    
+
     public void refreshChildren() {
     public void refreshChildren() {
-        ((JmeMotionPathChildren)this.jmeChildren).refreshChildren(true);
+        ((JmeMotionPathChildren) this.jmeChildren).refreshChildren(true);
         for (Object node : getChildren().getNodes()) {
         for (Object node : getChildren().getNodes()) {
             JmeMotionPath mPath = (JmeMotionPath) node;
             JmeMotionPath mPath = (JmeMotionPath) node;
             ((JmeVector3fChildren) mPath.getChildren()).refreshChildren(true);
             ((JmeVector3fChildren) mPath.getChildren()).refreshChildren(true);
@@ -157,13 +161,12 @@ public class JmeMotionEvent extends JmeControl {
 
 
     @Override
     @Override
     public void destroy() throws IOException {
     public void destroy() throws IOException {
-        for (Node n: getChildren().getNodes()) {
-            ((JmeMotionPath)n).destroy();
+        for (Node n : getChildren().getNodes()) {
+            ((JmeMotionPath) n).destroy();
         }
         }
         super.destroy();
         super.destroy();
     }
     }
-    
-    
+
     public void setModified(boolean immediate) {
     public void setModified(boolean immediate) {
         dataObject.setModified(immediate);
         dataObject.setModified(immediate);
     }
     }
@@ -175,17 +178,18 @@ public class JmeMotionEvent extends JmeControl {
 
 
     @Override
     @Override
     public boolean isEnabled() {
     public boolean isEnabled() {
-        if (motionEvent == null)
+        if (motionEvent == null) {
             return false;
             return false;
-        else
+        } else {
             return motionEvent.isEnabled();
             return motionEvent.isEnabled();
+        }
     }
     }
 
 
     @Override
     @Override
     public boolean setEnabled(boolean enabled) {
     public boolean setEnabled(boolean enabled) {
-        if (motionEvent == null)
+        if (motionEvent == null) {
             return false;
             return false;
-        else {
+        } else {
             motionEvent.setEnabled(enabled);
             motionEvent.setEnabled(enabled);
             return true;
             return true;
         }
         }

+ 64 - 58
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeMotionPath.java

@@ -57,6 +57,7 @@ import org.openide.util.actions.SystemAction;
 /**
 /**
  * This Class actually represents the MotionPath in the SceneComposer.<br>
  * This Class actually represents the MotionPath in the SceneComposer.<br>
  * It is added and managed by {@link JmeMotionPathChildren }
  * It is added and managed by {@link JmeMotionPathChildren }
+ *
  * @author MeFisto94
  * @author MeFisto94
  */
  */
 @org.openide.util.lookup.ServiceProvider(service = SceneExplorerNode.class)
 @org.openide.util.lookup.ServiceProvider(service = SceneExplorerNode.class)
@@ -68,13 +69,13 @@ public class JmeMotionPath extends AbstractSceneExplorerNode {
     private JmeMotionEvent motionEvent;
     private JmeMotionEvent motionEvent;
     private float debugBoxExtents = 0.5f;
     private float debugBoxExtents = 0.5f;
     private Spatial spatial;
     private Spatial spatial;
-    
+
     public JmeMotionPath() {
     public JmeMotionPath() {
     }
     }
 
 
     public JmeMotionPath(MotionPath motionPath, JmeMotionEvent parent, JmeVector3fChildren children) {
     public JmeMotionPath(MotionPath motionPath, JmeMotionEvent parent, JmeVector3fChildren children) {
         super(children);
         super(children);
-        
+
         this.motionPath = motionPath;
         this.motionPath = motionPath;
         getLookupContents().add(motionPath);
         getLookupContents().add(motionPath);
         getLookupContents().add(this);
         getLookupContents().add(this);
@@ -83,20 +84,21 @@ public class JmeMotionPath extends AbstractSceneExplorerNode {
         super.setDisplayName("Motion Path");
         super.setDisplayName("Motion Path");
         children.setJmeMotionPath(this);
         children.setJmeMotionPath(this);
         motionEvent = parent;
         motionEvent = parent;
-        
+
         updateSpline(false);
         updateSpline(false);
     }
     }
 
 
-    //<editor-fold defaultstate="collapsed" desc="Some boring Overrides">
+    //<editor-fold desc="Some Overrides for the Node">
     @Override
     @Override
     public Image getIcon(int type) {
     public Image getIcon(int type) {
         return smallImage;
         return smallImage;
     }
     }
+
     @Override
     @Override
     public Image getOpenedIcon(int type) {
     public Image getOpenedIcon(int type) {
         return smallImage;
         return smallImage;
     }
     }
-    
+
     @Override
     @Override
     public Action[] getActions(boolean context) {
     public Action[] getActions(boolean context) {
         MotionPathPopup m = new MotionPathPopup(this);
         MotionPathPopup m = new MotionPathPopup(this);
@@ -107,8 +109,8 @@ public class JmeMotionPath extends AbstractSceneExplorerNode {
             SystemAction.get(DeleteAction.class)
             SystemAction.get(DeleteAction.class)
         };
         };
     }
     }
-//</editor-fold>
-    
+    //</editor-fold>
+
     @Override
     @Override
     protected Sheet createSheet() {
     protected Sheet createSheet() {
         Sheet sheet = super.createSheet();
         Sheet sheet = super.createSheet();
@@ -116,77 +118,77 @@ public class JmeMotionPath extends AbstractSceneExplorerNode {
         set.setDisplayName("Motion Path");
         set.setDisplayName("Motion Path");
         set.setName(MotionPath.class.getName());
         set.setName(MotionPath.class.getName());
         set.setShortDescription("These are the Properties of the Motion Event's Motion Path");
         set.setShortDescription("These are the Properties of the Motion Event's Motion Path");
-       
+
         if (motionPath == null) {
         if (motionPath == null) {
             return sheet;
             return sheet;
         }
         }
-        
+
         Property<?> prop = makeEmbedProperty(this, getExplorerNodeClass(), motionPath.getPathSplineType().getClass(), "getPathSplineType", "setPathSplineType", "PathSplineType");
         Property<?> prop = makeEmbedProperty(this, getExplorerNodeClass(), motionPath.getPathSplineType().getClass(), "getPathSplineType", "setPathSplineType", "PathSplineType");
         prop.setShortDescription("Sets the Type of the Paths' Spline. This will define how the single waypoints are interpolated (linear, curvy)");
         prop.setShortDescription("Sets the Type of the Paths' Spline. This will define how the single waypoints are interpolated (linear, curvy)");
         set.put(prop);
         set.put(prop);
-        
+
         prop = makeEmbedProperty(this, getExplorerNodeClass(), float.class, "getCurveTension", "setCurveTension", "Curve Tension");
         prop = makeEmbedProperty(this, getExplorerNodeClass(), float.class, "getCurveTension", "setCurveTension", "Curve Tension");
         prop.setShortDescription("Sets the Curves' Tension. This defines how \"Curvy\" a curve will be. A tension of 0 would be completely linear.");
         prop.setShortDescription("Sets the Curves' Tension. This defines how \"Curvy\" a curve will be. A tension of 0 would be completely linear.");
         set.put(prop);
         set.put(prop);
-        
+
         prop = makeProperty(motionPath, boolean.class, "isCycle", "setCycle", "Cycle?");
         prop = makeProperty(motionPath, boolean.class, "isCycle", "setCycle", "Cycle?");
         prop.setShortDescription("Should the Path be a Cycle? This essentially means it will be looped. (Starting from the beginning after we're finished)");
         prop.setShortDescription("Should the Path be a Cycle? This essentially means it will be looped. (Starting from the beginning after we're finished)");
         set.put(prop);
         set.put(prop);
-        
+
         prop = makeProperty(motionPath, int.class, "getLength", null, "Path Length");
         prop = makeProperty(motionPath, int.class, "getLength", null, "Path Length");
         prop.setShortDescription("This is the total length this path has");
         prop.setShortDescription("This is the total length this path has");
         set.put(prop);
         set.put(prop);
-        
+
         prop = makeEmbedProperty(motionPath, motionPath.getClass(), int.class, "getNbWayPoints", null, "Number of Waypoints");
         prop = makeEmbedProperty(motionPath, motionPath.getClass(), int.class, "getNbWayPoints", null, "Number of Waypoints");
         prop.setShortDescription("Shows the Number of Waypoints this Path consists of");
         prop.setShortDescription("Shows the Number of Waypoints this Path consists of");
         set.put(prop);
         set.put(prop);
-        
+
         sheet.put(set);
         sheet.put(set);
-        
+
         set = Sheet.createPropertiesSet();
         set = Sheet.createPropertiesSet();
         set.setDisplayName("Motion Path SDK");
         set.setDisplayName("Motion Path SDK");
         set.setName("MotionPathSDK");
         set.setName("MotionPathSDK");
         set.setShortDescription("These are SDK-dependent Settings which have nothing to do with MotionEvent or MotionPath in the first place.");
         set.setShortDescription("These are SDK-dependent Settings which have nothing to do with MotionEvent or MotionPath in the first place.");
-        
+
         prop = makeEmbedProperty(this, JmeMotionPath.class, float.class, "getDebugBoxExtents", "setDebugBoxExtents", "DebugBox Extents");
         prop = makeEmbedProperty(this, JmeMotionPath.class, float.class, "getDebugBoxExtents", "setDebugBoxExtents", "DebugBox Extents");
         prop.setShortDescription("The DebugBox Extents defines how big the Debug Boxes (i.e. the Boxes you see for each Waypoint) are. Note: The BoxSize is 2 * extents");
         prop.setShortDescription("The DebugBox Extents defines how big the Debug Boxes (i.e. the Boxes you see for each Waypoint) are. Note: The BoxSize is 2 * extents");
         set.put(prop);
         set.put(prop);
         sheet.put(set);
         sheet.put(set);
-        
+
         return sheet;
         return sheet;
     }
     }
-    
+
     public MotionPath getMotionPath() {
     public MotionPath getMotionPath() {
         return motionPath;
         return motionPath;
     }
     }
-    
+
     public JmeMotionEvent getMotionEvent() {
     public JmeMotionEvent getMotionEvent() {
         return motionEvent;
         return motionEvent;
     }
     }
-    
-    //<editor-fold defaultstate="collapsed" desc="Properties Getter/Setter">
+
+    //<editor-fold desc="Properties Getter/Setter">
     public float getDebugBoxExtents() {
     public float getDebugBoxExtents() {
         return debugBoxExtents;
         return debugBoxExtents;
     }
     }
-    
+
     public void setDebugBoxExtents(float extents) {
     public void setDebugBoxExtents(float extents) {
         debugBoxExtents = extents;
         debugBoxExtents = extents;
-        
+
         if (getChildren() != null) {
         if (getChildren() != null) {
             for (Node n : getChildren().getNodes()) {
             for (Node n : getChildren().getNodes()) {
                 if (n instanceof JmeVector3f) {
                 if (n instanceof JmeVector3f) {
-                    ((JmeVector3f)n).updateBox();
+                    ((JmeVector3f) n).updateBox();
                 } else {
                 } else {
                     Logger.getLogger(JmeMotionPath.class.getName()).log(Level.WARNING, "JmeMotionPath has some unknown Children...");
                     Logger.getLogger(JmeMotionPath.class.getName()).log(Level.WARNING, "JmeMotionPath has some unknown Children...");
                 }
                 }
             }
             }
         }
         }
     }
     }
-    
+
     public Spline.SplineType getPathSplineType() {
     public Spline.SplineType getPathSplineType() {
         return motionPath.getPathSplineType();
         return motionPath.getPathSplineType();
     }
     }
-    
+
     public void setPathSplineType(Spline.SplineType sType) {
     public void setPathSplineType(Spline.SplineType sType) {
         if (sType == Spline.SplineType.Nurb) {
         if (sType == Spline.SplineType.Nurb) {
             Logger.getLogger(JmeMotionPath.class.getName()).log(Level.SEVERE, "Nurb Curves aren't possible at the moment (they require additional helper points). Reverting to Catmull..");
             Logger.getLogger(JmeMotionPath.class.getName()).log(Level.SEVERE, "Nurb Curves aren't possible at the moment (they require additional helper points). Reverting to Catmull..");
@@ -197,20 +199,20 @@ public class JmeMotionPath extends AbstractSceneExplorerNode {
             setPathSplineType(Spline.SplineType.CatmullRom);
             setPathSplineType(Spline.SplineType.CatmullRom);
             return;
             return;
         }
         }
-        
+
         motionPath.setPathSplineType(sType);
         motionPath.setPathSplineType(sType);
         updateSpline(true);
         updateSpline(true);
     }
     }
-    
+
     public float getCurveTension() {
     public float getCurveTension() {
         return motionPath.getCurveTension();
         return motionPath.getCurveTension();
     }
     }
-    
+
     public void setCurveTension(float f) {
     public void setCurveTension(float f) {
         motionPath.setCurveTension(f);
         motionPath.setCurveTension(f);
         updateSpline(true);
         updateSpline(true);
     }
     }
-//</editor-fold>
+    //</editor-fold>
 
 
     @Override
     @Override
     public Class getExplorerObjectClass() {
     public Class getExplorerObjectClass() {
@@ -226,38 +228,38 @@ public class JmeMotionPath extends AbstractSceneExplorerNode {
     public org.openide.nodes.Node[] createNodes(Object key, DataObject key2, boolean cookie) {
     public org.openide.nodes.Node[] createNodes(Object key, DataObject key2, boolean cookie) {
         return null;
         return null;
     }
     }
-    
+
     public void refreshChildren() {
     public void refreshChildren() {
-        ((JmeVector3fChildren)this.jmeChildren).refreshChildren(true);
+        ((JmeVector3fChildren) this.jmeChildren).refreshChildren(true);
         updateSpline(false);
         updateSpline(false);
     }
     }
-    
+
     @Override
     @Override
     public void destroy() throws IOException {
     public void destroy() throws IOException {
-        for (Node n: getChildren().getNodes()) {
-            ((JmeVector3f)n).destroy();
+        for (Node n : getChildren().getNodes()) {
+            ((JmeVector3f) n).destroy();
         }
         }
         super.destroy();
         super.destroy();
         ((AbstractSceneExplorerNode) getParentNode()).refresh(true);
         ((AbstractSceneExplorerNode) getParentNode()).refresh(true);
     }
     }
-    
+
     public void enableDebugShapes() {
     public void enableDebugShapes() {
         for (Node n : getChildren().getNodes()) {
         for (Node n : getChildren().getNodes()) {
             if (n instanceof JmeVector3f) {
             if (n instanceof JmeVector3f) {
-                ((JmeVector3f)n).attachBox(((JmeVector3f)n).spatial, this);
+                ((JmeVector3f) n).attachBox(((JmeVector3f) n).spatial, this);
             }
             }
         }
         }
-        
+
         updateSpline(false);
         updateSpline(false);
     }
     }
-    
+
     public void disableDebugShapes() {
     public void disableDebugShapes() {
         for (Node n : getChildren().getNodes()) {
         for (Node n : getChildren().getNodes()) {
             if (n instanceof JmeVector3f) {
             if (n instanceof JmeVector3f) {
-                ((JmeVector3f)n).detachBox(((JmeVector3f)n).spatial);
+                ((JmeVector3f) n).detachBox(((JmeVector3f) n).spatial);
             }
             }
         }
         }
-        
+
         if (spatial != null) {
         if (spatial != null) {
             final Spatial spat = spatial;
             final Spatial spat = spatial;
             SceneApplication.getApplication().enqueue(new Callable<Void>() {
             SceneApplication.getApplication().enqueue(new Callable<Void>() {
@@ -268,11 +270,15 @@ public class JmeMotionPath extends AbstractSceneExplorerNode {
                 }
                 }
             });
             });
         }
         }
-        
+
     }
     }
+
     /**
     /**
      * Call this to update the visual Spline.
      * Call this to update the visual Spline.
-     * @param wasModified If the Spatial was Modified and hence the dirty-safe flag should be triggered (only false for the Constructors first initiation)
+     *
+     * @param wasModified If the Spatial was Modified and hence the dirty-safe
+     * flag should be triggered (only false for the Constructors first
+     * initiation)
      */
      */
     public void updateSpline(boolean wasModified) {
     public void updateSpline(boolean wasModified) {
         if (spatial != null) {
         if (spatial != null) {
@@ -285,42 +291,42 @@ public class JmeMotionPath extends AbstractSceneExplorerNode {
                 }
                 }
             });
             });
         }
         }
-        
+
         Material m = new Material(SceneApplication.getApplication().getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
         Material m = new Material(SceneApplication.getApplication().getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
         m.setColor("Color", ColorRGBA.Red);
         m.setColor("Color", ColorRGBA.Red);
-        m.getAdditionalRenderState().setLineWidth(4f); // Brand new feature ;)
-        
-        switch (motionPath.getPathSplineType())
-        {
+        // Alpha4: m.getAdditionalRenderState().setLineWidth(4f);
+
+        switch (motionPath.getPathSplineType()) {
             case CatmullRom:
             case CatmullRom:
                 Geometry geo = new Geometry("Curve", new Curve(motionPath.getSpline(), 10));
                 Geometry geo = new Geometry("Curve", new Curve(motionPath.getSpline(), 10));
                 geo.setMaterial(m);
                 geo.setMaterial(m);
                 spatial = geo;
                 spatial = geo;
                 break;
                 break;
-                
+
             case Linear:
             case Linear:
                 geo = new Geometry("Curve", new Curve(motionPath.getSpline(), 0));
                 geo = new Geometry("Curve", new Curve(motionPath.getSpline(), 0));
                 geo.setMaterial(m);
                 geo.setMaterial(m);
                 spatial = geo;
                 spatial = geo;
                 break;
                 break;
-                
+
             default:
             default:
                 geo = new Geometry("Curve", new Curve(motionPath.getSpline(), 10));
                 geo = new Geometry("Curve", new Curve(motionPath.getSpline(), 10));
                 geo.setMaterial(m);
                 geo.setMaterial(m);
                 spatial = geo;
                 spatial = geo;
                 break;
                 break;
         }
         }
-        
+
         final Spatial spat = spatial;
         final Spatial spat = spatial;
         SceneApplication.getApplication().enqueue(new Callable<Void>() {
         SceneApplication.getApplication().enqueue(new Callable<Void>() {
-                @Override
-                public Void call() throws Exception {
-                    SceneApplication.getApplication().getRootNode().attachChild(spat);
-                    return null;
-                }
+            @Override
+            public Void call() throws Exception {
+                SceneApplication.getApplication().getRootNode().attachChild(spat);
+                return null;
+            }
         });
         });
-        
-        if (wasModified)
+
+        if (wasModified) {
             motionEvent.setModified(true);
             motionEvent.setModified(true);
+        }
     }
     }
 }
 }

+ 9 - 4
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeMotionPathChildren.java

@@ -45,10 +45,14 @@ import org.openide.nodes.Node;
 import org.openide.util.Exceptions;
 import org.openide.util.Exceptions;
 
 
 /**
 /**
- * This Class is responsible for the management of all underlying MotionPaths as Nodes<br>
- * (In fact we currently only have one possible MotionPath but we keep this to be consistent with JmeBoneChildren).<br>
- * You have to ensure that you set the appropriate JmeMotionEvent for this class (this happens when JmeMotionEvent is creating it's Nodes)<br>
+ * This Class is responsible for the management of all underlying MotionPaths as
+ * Nodes<br>
+ * (In fact we currently only have one possible MotionPath but we keep this to
+ * be consistent with JmeBoneChildren).<br>
+ * You have to ensure that you set the appropriate JmeMotionEvent for this class
+ * (this happens when JmeMotionEvent is creating it's Nodes)<br>
  * It will use this class as Children (which are JmeMotionPaths)<br>
  * It will use this class as Children (which are JmeMotionPaths)<br>
+ *
  * @author MeFisto94
  * @author MeFisto94
  */
  */
 public class JmeMotionPathChildren extends Children.Keys<Object> {
 public class JmeMotionPathChildren extends Children.Keys<Object> {
@@ -86,12 +90,13 @@ public class JmeMotionPathChildren extends Children.Keys<Object> {
         try {
         try {
             return SceneApplication.getApplication().enqueue(new Callable<List<Object>>() {
             return SceneApplication.getApplication().enqueue(new Callable<List<Object>>() {
 
 
+                @Override
                 public List<Object> call() throws Exception {
                 public List<Object> call() throws Exception {
                     List<Object> keys = new LinkedList<Object>();
                     List<Object> keys = new LinkedList<Object>();
                     if (path != null) {
                     if (path != null) {
                         keys.add(path);
                         keys.add(path);
                     } else {
                     } else {
-                        keys.add(((MotionEvent)jmeMotionEvent.control).getPath());
+                        keys.add(((MotionEvent) jmeMotionEvent.control).getPath());
                     }
                     }
 
 
                     return keys;
                     return keys;

+ 85 - 67
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeVector3f.java

@@ -52,8 +52,11 @@ import org.openide.nodes.Sheet;
 import org.openide.util.actions.SystemAction;
 import org.openide.util.actions.SystemAction;
 
 
 /**
 /**
- * This Class actually represents the MotionPaths Waypoints in the SceneComposer.<br>
- * It is added and managed by {@link JmeVector3fChildren } but it could also be used for any other Waypointish Thing
+ * This Class actually represents the MotionPaths Waypoints in the
+ * SceneComposer.<br>
+ * It is added and managed by {@link JmeVector3fChildren } but it could also be
+ * used for any other Waypointish Thing
+ *
  * @author MeFisto94
  * @author MeFisto94
  */
  */
 @SuppressWarnings({"unchecked", "rawtypes", "OverridableMethodCallInConstructor", "LeakingThisInConstructor"})
 @SuppressWarnings({"unchecked", "rawtypes", "OverridableMethodCallInConstructor", "LeakingThisInConstructor"})
@@ -64,63 +67,70 @@ public class JmeVector3f extends JmeSpatial {
     private JmeMotionPath jmeMotionPath;
     private JmeMotionPath jmeMotionPath;
     private Vector3f v;
     private Vector3f v;
     private float extents;
     private float extents;
-    
+
     public JmeVector3f() {
     public JmeVector3f() {
         super();
         super();
     }
     }
-    
+
     public JmeVector3f(JmeVector3fChildren parent, JmeMotionPath jmeMotionPath, Vector3f vec) {
     public JmeVector3f(JmeVector3fChildren parent, JmeMotionPath jmeMotionPath, Vector3f vec) {
         super();
         super();
-        
+
         v = vec;
         v = vec;
         this.parent = parent;
         this.parent = parent;
         this.jmeMotionPath = jmeMotionPath;
         this.jmeMotionPath = jmeMotionPath;
         spatial = generateBox();
         spatial = generateBox();
-        
+
         getLookupContents().add(spatial);
         getLookupContents().add(spatial);
         getLookupContents().add(vec);
         getLookupContents().add(vec);
         getLookupContents().add(this);
         getLookupContents().add(this);
-        
+
         super.setDisplayName("Waypoint");
         super.setDisplayName("Waypoint");
         super.setName(spatial.getName());
         super.setName(spatial.getName());
-        
+
         attachBox(spatial, jmeMotionPath);
         attachBox(spatial, jmeMotionPath);
     }
     }
-    
+
     /**
     /**
      * GenerateBox will simply generate our {@link DebugBoxGeometry }
      * GenerateBox will simply generate our {@link DebugBoxGeometry }
-     * @return 
+     *
+     * @return the generated DebugBoxGeometry
      */
      */
     private Geometry generateBox() {
     private Geometry generateBox() {
         extents = jmeMotionPath.getDebugBoxExtents();
         extents = jmeMotionPath.getDebugBoxExtents();
         DebugBoxGeometry geom = new DebugBoxGeometry("Waypoint", extents, this);
         DebugBoxGeometry geom = new DebugBoxGeometry("Waypoint", extents, this);
-        
+
         Material mat = new Material(SceneApplication.getApplication().getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
         Material mat = new Material(SceneApplication.getApplication().getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
         mat.setColor("Color", ColorRGBA.Cyan);
         mat.setColor("Color", ColorRGBA.Cyan);
         geom.setMaterial(mat);
         geom.setMaterial(mat);
         geom.setInternalLocalTranslation(v);
         geom.setInternalLocalTranslation(v);
-        
+
         return geom;
         return geom;
-    } 
+    }
+
     /**
     /**
-     * AttachBox is the internal method simply used to attach the DebugBox to the Scene Graph.
+     * AttachBox is the internal method simply used to attach the DebugBox to
+     * the Scene Graph.
+     *
      * @param s The Spatial to attach
      * @param s The Spatial to attach
      * @param jmeMotionPath The Parental Node to refresh.
      * @param jmeMotionPath The Parental Node to refresh.
      */
      */
     protected void attachBox(final Spatial s, final JmeMotionPath jmeMotionPath) {
     protected void attachBox(final Spatial s, final JmeMotionPath jmeMotionPath) {
         SceneApplication.getApplication().enqueue(new Callable<Void>() {
         SceneApplication.getApplication().enqueue(new Callable<Void>() {
-                @Override
-                public Void call() throws Exception {
-                    SceneApplication.getApplication().getRootNode().attachChild(s);
-                    jmeMotionPath.refresh(true);
-                    return null;
-                }
+            @Override
+            public Void call() throws Exception {
+                SceneApplication.getApplication().getRootNode().attachChild(s);
+                jmeMotionPath.refresh(true);
+                return null;
+            }
         });
         });
     }
     }
+
     /**
     /**
-     * This detaches the DebugBox from the SceneGraph but also waits for this to happen.
-     * This is because we want to reattach a new box and it's just better this way :P
-     * @param s
+     * This detaches the DebugBox from the SceneGraph but also waits for this to
+     * happen.<br>This is because we want to reattach a new box and it's just
+     * better this way :P
+     *
+     * @param s The Spatial to detach
      */
      */
     protected void detachBox(final Spatial s) {
     protected void detachBox(final Spatial s) {
         SceneApplication.getApplication().enqueue(new Callable<Void>() {
         SceneApplication.getApplication().enqueue(new Callable<Void>() {
@@ -131,10 +141,11 @@ public class JmeVector3f extends JmeSpatial {
             }
             }
         });
         });
     }
     }
+
     /**
     /**
-     * This will trigger a rebuild of the whole Box.
-     * It is used internally if the box dimensions have changed ({@link JmeMotionPath#setDebugBoxExtents(float) })
-     * Moving the Boxes around does NOT need a rebuild.
+     * This will trigger a rebuild of the whole Box.<br>It is used internally if
+     * the box dimensions have changed ({@link JmeMotionPath#setDebugBoxExtents(float)
+     * }).<br>Moving the Boxes around does NOT need a rebuild.
      */
      */
     public void updateBox() {
     public void updateBox() {
         getLookupContents().remove(spatial);
         getLookupContents().remove(spatial);
@@ -143,21 +154,23 @@ public class JmeVector3f extends JmeSpatial {
         getLookupContents().add(spatial);
         getLookupContents().add(spatial);
         attachBox(spatial, jmeMotionPath);
         attachBox(spatial, jmeMotionPath);
     }
     }
+
     /**
     /**
-     * This is called when the Vector v has been moved (without the setVector3f which is our callback).
-     * This means it was moved by the Properties Dialog (see setXYZ())
+     * This is called when the Vector v has been moved (without the setVector3f
+     * which is our callback).<br>This means it was moved by the Properties
+     * Dialog (see setXYZ())
      */
      */
     public void moveBox() {
     public void moveBox() {
         SceneApplication.getApplication().enqueue(new Runnable() {
         SceneApplication.getApplication().enqueue(new Runnable() {
             @Override
             @Override
             public void run() {
             public void run() {
                 spatial.setLocalTranslation(v); // It's a bit redundant since it will call #setVector3f() but there's no other way.
                 spatial.setLocalTranslation(v); // It's a bit redundant since it will call #setVector3f() but there's no other way.
-                                                // Plus it will invoke updateSpline() for us.
+                // Plus it will invoke updateSpline() for us.
             }
             }
         });
         });
     }
     }
-    
-    // <editor-fold defaultstate="collapsed" desc="Just some boring Overrides ">
+
+    // <editor-fold desc="Just some Overrides for Node">
     @Override
     @Override
     public Image getIcon(int type) {
     public Image getIcon(int type) {
         return smallImage;
         return smallImage;
@@ -167,7 +180,7 @@ public class JmeVector3f extends JmeSpatial {
     public Image getOpenedIcon(int type) {
     public Image getOpenedIcon(int type) {
         return smallImage;
         return smallImage;
     }
     }
-    
+
     @Override
     @Override
     public Action[] getActions(boolean context) {
     public Action[] getActions(boolean context) {
         return new Action[]{
         return new Action[]{
@@ -176,22 +189,22 @@ public class JmeVector3f extends JmeSpatial {
             SystemAction.get(MoveDownAction.class)
             SystemAction.get(MoveDownAction.class)
         };
         };
     }
     }
-    
+
     @Override
     @Override
     public boolean canRename() {
     public boolean canRename() {
         return true;
         return true;
     }
     }
-    
+
     @Override
     @Override
     public boolean canDestroy() {
     public boolean canDestroy() {
         return true;
         return true;
     }
     }
-    
+
     @Override
     @Override
     public boolean canCut() {
     public boolean canCut() {
         return false;
         return false;
     }
     }
-    
+
     @Override
     @Override
     public boolean canCopy() {
     public boolean canCopy() {
         return false;
         return false;
@@ -200,26 +213,25 @@ public class JmeVector3f extends JmeSpatial {
     @Override
     @Override
     public void destroy() throws IOException {
     public void destroy() throws IOException {
         detachBox(spatial);
         detachBox(spatial);
-        
+
         /* These are mandatory:
         /* These are mandatory:
          * Without them the Node looks like it's undeletable
          * Without them the Node looks like it's undeletable
          * (since it stays in the Motion Path and gets readded everytime)
          * (since it stays in the Motion Path and gets readded everytime)
          */
          */
-        parent.remove(new Node[] { this });
+        parent.remove(new Node[]{this});
         parent.refreshChildren(true);
         parent.refreshChildren(true);
         jmeMotionPath.updateSpline(true);
         jmeMotionPath.updateSpline(true);
         super.destroy();
         super.destroy();
     }
     }
+    // </editor-fold>
 
 
-// </editor-fold>
-    
     /* For Properties */
     /* For Properties */
     public int getChildIndex() {
     public int getChildIndex() {
         int idx = parent.indexOf(this);
         int idx = parent.indexOf(this);
         setDisplayName("Waypoint " + idx);
         setDisplayName("Waypoint " + idx);
         return idx;
         return idx;
     }
     }
-    
+
     @Override
     @Override
     protected Sheet createSheet() {
     protected Sheet createSheet() {
         Sheet sheet = Sheet.createDefault();
         Sheet sheet = Sheet.createDefault();
@@ -227,104 +239,109 @@ public class JmeVector3f extends JmeSpatial {
         set.setDisplayName("Vector3f");
         set.setDisplayName("Vector3f");
         set.setName(Vector3f.class.getName());
         set.setName(Vector3f.class.getName());
         set.setShortDescription("These are the Properties of the Motion Paths's Waypoint (Vector3f). Feel free to either edit the floats seperately or use the [x, y, z] way. Make sure that you defocus and focus this Node again in order to have the Properties be reloaded");
         set.setShortDescription("These are the Properties of the Motion Paths's Waypoint (Vector3f). Feel free to either edit the floats seperately or use the [x, y, z] way. Make sure that you defocus and focus this Node again in order to have the Properties be reloaded");
-       
+
         if (v == null) {
         if (v == null) {
             return sheet;
             return sheet;
         }
         }
-        
+
         Property p = makeEmbedProperty(this, getExplorerNodeClass(), float.class, "getX", "setX", "X");
         Property p = makeEmbedProperty(this, getExplorerNodeClass(), float.class, "getX", "setX", "X");
         p.setShortDescription("The Vector3f's X-Value");
         p.setShortDescription("The Vector3f's X-Value");
         set.put(p);
         set.put(p);
-        
+
         p = makeEmbedProperty(this, getExplorerNodeClass(), float.class, "getY", "setY", "Y");
         p = makeEmbedProperty(this, getExplorerNodeClass(), float.class, "getY", "setY", "Y");
         p.setShortDescription("The Vector3f's Y-Value");
         p.setShortDescription("The Vector3f's Y-Value");
         set.put(p);
         set.put(p);
-        
+
         p = makeEmbedProperty(this, getExplorerNodeClass(), float.class, "getZ", "setZ", "Z");
         p = makeEmbedProperty(this, getExplorerNodeClass(), float.class, "getZ", "setZ", "Z");
         p.setShortDescription("The Vector3f's Z-Value");
         p.setShortDescription("The Vector3f's Z-Value");
         set.put(p);
         set.put(p);
-        
+
         p = makeEmbedProperty(this, getExplorerNodeClass(), int.class, "getChildIndex", null, "Child Index");
         p = makeEmbedProperty(this, getExplorerNodeClass(), int.class, "getChildIndex", null, "Child Index");
         p.setShortDescription("The Index of this Node inside of the MotionPath's Children");
         p.setShortDescription("The Index of this Node inside of the MotionPath's Children");
         set.put(p);
         set.put(p);
-        
+
         createFields(Vector3f.class, set, v);
         createFields(Vector3f.class, set, v);
-        
+
         sheet.put(set);
         sheet.put(set);
         return sheet;
         return sheet;
     }
     }
-    
+
     /**
     /**
      * This is a conveniance method to access the internal Vector3f.
      * This is a conveniance method to access the internal Vector3f.
-     * Currently it's even unused.
+     *
      * @return The Vector3f representated by this Node
      * @return The Vector3f representated by this Node
      */
      */
     public Vector3f getVector3f() {
     public Vector3f getVector3f() {
         return v;
         return v;
     }
     }
+
     /**
     /**
-     * This is the callback which will be called by the Geometry.
-     * It is used to update the DataStructure with the Debug Box Position
-     * @param to 
+     * This is the callback which will be called by the Geometry. It is used to
+     * update the DataStructure with the Debug Box Position
+     *
+     * @param to
      */
      */
     public void setVector3f(Vector3f to) {
     public void setVector3f(Vector3f to) {
         v.set(to);
         v.set(to);
     }
     }
-    
+
     /* The following 6 methods are just so we know when the user typed in some properties.
     /* The following 6 methods are just so we know when the user typed in some properties.
      * Note: A PropertyChangeListener would also be appropriate and even less code.
      * Note: A PropertyChangeListener would also be appropriate and even less code.
      */
      */
-    //<editor-fold defaultstate="collapsed" desc="The Setters for the Properties Panel">
+    //<editor-fold desc="The Setters for the Properties Panel">
     public void setX(float x) {
     public void setX(float x) {
         //v.x = x;
         //v.x = x;
         v.setX(x);
         v.setX(x);
         moveBox();
         moveBox();
     }
     }
-    
+
     public void setY(float y) {
     public void setY(float y) {
         v.y = y;
         v.y = y;
         moveBox();
         moveBox();
     }
     }
-    
+
     public void setZ(float z) {
     public void setZ(float z) {
         v.z = z;
         v.z = z;
         moveBox();
         moveBox();
     }
     }
-    
+
     public float getX() {
     public float getX() {
         return v.x;
         return v.x;
     }
     }
-    
+
     public float getY() {
     public float getY() {
         return v.y;
         return v.y;
     }
     }
-    
+
     public float getZ() {
     public float getZ() {
         return v.z;
         return v.z;
     }
     }
 //</editor-fold>
 //</editor-fold>
-    
+
     @Override
     @Override
     public Class getExplorerObjectClass() {
     public Class getExplorerObjectClass() {
         return Vector3f.class;
         return Vector3f.class;
     }
     }
+
     @Override
     @Override
     public Class getExplorerNodeClass() {
     public Class getExplorerNodeClass() {
         return JmeVector3f.class;
         return JmeVector3f.class;
     }
     }
+
     @Override
     @Override
     public org.openide.nodes.Node[] createNodes(Object key, DataObject key2, boolean cookie) {
     public org.openide.nodes.Node[] createNodes(Object key, DataObject key2, boolean cookie) {
         return null;
         return null;
     }
     }
-    
+
     private class DebugBoxGeometry extends Geometry {
     private class DebugBoxGeometry extends Geometry {
+
         JmeVector3f self;
         JmeVector3f self;
-        
+
         public DebugBoxGeometry(String s, float extents, JmeVector3f jme) {
         public DebugBoxGeometry(String s, float extents, JmeVector3f jme) {
             super(s, new Box(extents, extents, extents));
             super(s, new Box(extents, extents, extents));
             self = jme;
             self = jme;
         }
         }
-        
+
         @Override
         @Override
         public void setLocalTranslation(float x, float y, float z) {
         public void setLocalTranslation(float x, float y, float z) {
             this.setLocalTranslation(new Vector3f(x, y, z));
             this.setLocalTranslation(new Vector3f(x, y, z));
@@ -338,9 +355,10 @@ public class JmeVector3f extends JmeSpatial {
         }
         }
 
 
         /**
         /**
-         * Since the usual translation updates the spline and hence triggers setModified,
-         * we need an internal method (e.g. for the Constructor)
-         * @param localTranslation the translation to set. 
+         * Since the usual translation updates the spline and hence triggers
+         * setModified, we need an internal method (e.g. for the Constructor)
+         *
+         * @param localTranslation the translation to set.
          */
          */
         public void setInternalLocalTranslation(Vector3f localTranslation) {
         public void setInternalLocalTranslation(Vector3f localTranslation) {
             super.setLocalTranslation(localTranslation);
             super.setLocalTranslation(localTranslation);

+ 54 - 45
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeVector3fChildren.java

@@ -34,23 +34,25 @@ package com.jme3.gde.core.sceneexplorer.nodes;
 import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.math.Spline;
 import com.jme3.math.Spline;
 import com.jme3.math.Vector3f;
 import com.jme3.math.Vector3f;
-import java.util.logging.Logger;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.List;
 import java.util.concurrent.Callable;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutionException;
-import java.util.logging.Level;
 import org.openide.loaders.DataObject;
 import org.openide.loaders.DataObject;
 import org.openide.nodes.Index;
 import org.openide.nodes.Index;
 import org.openide.nodes.Node;
 import org.openide.nodes.Node;
 import org.openide.util.Exceptions;
 import org.openide.util.Exceptions;
 
 
 /**
 /**
- * This Class is responsible for the management of all underlying Vector3fs as Nodes<br>
- * (In fact we currently only have one possible MotionPath but we keep this to be consistent with JmeBoneChildren).<br>
- * You have to ensure that you set the appropriate JmeMotionEvent for this class (this happens when JmeMotionEvent is creating it's Nodes)<br>
+ * This Class is responsible for the management of all underlying Vector3fs as
+ * Nodes<br>
+ * (In fact we currently only have one possible MotionPath but we keep this to
+ * be consistent with JmeBoneChildren).<br>
+ * You have to ensure that you set the appropriate JmeMotionEvent for this class
+ * (this happens when JmeMotionEvent is creating it's Nodes)<br>
  * It will use this class as Children (which are JmeMotionPaths)<br>
  * It will use this class as Children (which are JmeMotionPaths)<br>
+ *
  * @author MeFisto94
  * @author MeFisto94
  */
  */
 public class JmeVector3fChildren extends Index.ArrayChildren {
 public class JmeVector3fChildren extends Index.ArrayChildren {
@@ -85,11 +87,11 @@ public class JmeVector3fChildren extends Index.ArrayChildren {
                 public List<Vector3f> call() throws Exception {
                 public List<Vector3f> call() throws Exception {
                     List<Vector3f> keys = new LinkedList<Vector3f>();
                     List<Vector3f> keys = new LinkedList<Vector3f>();
                     if (jmeMotionPath.getMotionPath() != null) {
                     if (jmeMotionPath.getMotionPath() != null) {
-                        for (int i = 0; i <jmeMotionPath.getMotionPath().getNbWayPoints(); i++) {
+                        for (int i = 0; i < jmeMotionPath.getMotionPath().getNbWayPoints(); i++) {
                             keys.add(jmeMotionPath.getMotionPath().getWayPoint(i));
                             keys.add(jmeMotionPath.getMotionPath().getWayPoint(i));
                         }
                         }
                     }
                     }
-                    
+
                     return keys;
                     return keys;
                 }
                 }
             }).get();
             }).get();
@@ -100,51 +102,51 @@ public class JmeVector3fChildren extends Index.ArrayChildren {
         }
         }
         return null;
         return null;
     }
     }
-   
+
     /**
     /**
-     * This is called when Index.ArrayChildren initiates it's list.
-     * It's similar to createNodes and createKeys.
-     * @return 
+     * This is called when Index.ArrayChildren initiates it's list. It's similar
+     * to createNodes and createKeys.
+     *
+     * @return
      */
      */
     @Override
     @Override
     protected List<Node> initCollection() {
     protected List<Node> initCollection() {
         List<Vector3f> keyList = createKeys();
         List<Vector3f> keyList = createKeys();
         ArrayList<Node> nodeList = new ArrayList<Node>(keyList.size());
         ArrayList<Node> nodeList = new ArrayList<Node>(keyList.size());
         int i = 0;
         int i = 0;
-        
-        for (Vector3f v: keyList) {
+
+        for (Vector3f v : keyList) {
             Node n = new JmeVector3f(this, jmeMotionPath, v).setReadOnly(readOnly);
             Node n = new JmeVector3f(this, jmeMotionPath, v).setReadOnly(readOnly);
             n.setDisplayName("Waypoint " + i);
             n.setDisplayName("Waypoint " + i);
             nodeList.add(n);
             nodeList.add(n);
             i++;
             i++;
         }
         }
-        
+
         return nodeList;
         return nodeList;
     }
     }
 
 
     @Override
     @Override
     public boolean remove(Node[] arr) {
     public boolean remove(Node[] arr) {
         for (Node n : arr) {
         for (Node n : arr) {
-            jmeMotionPath.getMotionPath().removeWayPoint(((JmeVector3f)n).getVector3f());
+            jmeMotionPath.getMotionPath().removeWayPoint(((JmeVector3f) n).getVector3f());
         }
         }
-        
+
         return super.remove(arr);
         return super.remove(arr);
     }
     }
 
 
     @Override
     @Override
     public boolean add(Node[] arr) {
     public boolean add(Node[] arr) {
-        for (Node n: arr) {
+        for (Node n : arr) {
             //DON'T USE THIS -> jmeMotionPath.getMotionPath().addWayPoint(v);
             //DON'T USE THIS -> jmeMotionPath.getMotionPath().addWayPoint(v);
-            // It will clone v and as such we're not able to change it anymore.
+            //It will clone v and as such we're not able to change it anymore.
             //jmeMotionPath.getMotionPath().getSpline().getControlPoints().add(((JmeVector3f)n).getVector3f());
             //jmeMotionPath.getMotionPath().getSpline().getControlPoints().add(((JmeVector3f)n).getVector3f());
-            addControlPoint(jmeMotionPath.getMotionPath().getSpline(), ((JmeVector3f)n).getVector3f());
-            // Alternative could be nodes = initCollection()
+            addControlPoint(jmeMotionPath.getMotionPath().getSpline(), ((JmeVector3f) n).getVector3f());
         }
         }
-        
+
         return super.add(arr);
         return super.add(arr);
     }
     }
-    
-    /* Code taken from Spline.java, except the clone part */
+
+    /* Code taken from Spline.java, removed the .clone() part */
     private void addControlPoint(Spline spline, Vector3f controlPoint) {
     private void addControlPoint(Spline spline, Vector3f controlPoint) {
         List<Vector3f> controlPoints = spline.getControlPoints();
         List<Vector3f> controlPoints = spline.getControlPoints();
         if (controlPoints.size() > 2 && spline.isCycle()) {
         if (controlPoints.size() > 2 && spline.isCycle()) {
@@ -155,14 +157,16 @@ public class JmeVector3fChildren extends Index.ArrayChildren {
             controlPoints.add(controlPoints.get(0).clone());
             controlPoints.add(controlPoints.get(0).clone());
         }
         }
         if (controlPoints.size() > 1) {
         if (controlPoints.size() > 1) {
-            // spline.computeTotalLength();
-            spline.setCurveTension(spline.getCurveTension());
+            spline.setCurveTension(spline.getCurveTension()); // this calls spline.computeTotalLength();
         }
         }
     }
     }
-    
+
     /**
     /**
-     * This Method is used because before createNodes takes place we are called by the default constructor and have to pass things...
-     * @param jmeMotionPath The JmeMotionPath instance which is this nodes parent. 
+     * This Method is used because before createNodes takes place we are called
+     * by the default constructor and have to pass things...
+     *
+     * @param jmeMotionPath The JmeMotionPath instance which is this nodes
+     * parent.
      */
      */
     public void setJmeMotionPath(JmeMotionPath jmeMotionPath) {
     public void setJmeMotionPath(JmeMotionPath jmeMotionPath) {
         this.jmeMotionPath = jmeMotionPath;
         this.jmeMotionPath = jmeMotionPath;
@@ -171,60 +175,65 @@ public class JmeVector3fChildren extends Index.ArrayChildren {
     public DataObject getDataObject() {
     public DataObject getDataObject() {
         return dataObject;
         return dataObject;
     }
     }
+
     public void setDataObject(DataObject dataObject) {
     public void setDataObject(DataObject dataObject) {
         this.dataObject = dataObject;
         this.dataObject = dataObject;
     }
     }
 
 
-    /* Basically we should override everything from Index.ArrayChildren, but it's no fun and since we don't support dragging them (which could need exchange()
-     * we just stick with this way :P
+    /**
+     * Basically we should override everything from Index.ArrayChildren, but
+     * it's no fun and since we don't support dragging them (which could need
+     * exchange() we just stick with this way.
      */
      */
-    
     /**
     /**
      * Move an element up
      * Move an element up
+     *
      * @param i index of element to move up
      * @param i index of element to move up
      */
      */
     @Override
     @Override
     public void moveUp(int i) {
     public void moveUp(int i) {
         super.moveUp(i);
         super.moveUp(i);
-        
+
         List<Vector3f> controlPoints = jmeMotionPath.getMotionPath().getSpline().getControlPoints();
         List<Vector3f> controlPoints = jmeMotionPath.getMotionPath().getSpline().getControlPoints();
-        
-        if (i < 1 || i > controlPoints.size())
+
+        if (i < 1 || i > controlPoints.size()) {
             throw new IndexOutOfBoundsException();
             throw new IndexOutOfBoundsException();
-        
+        }
+
         Vector3f element = controlPoints.get(i);
         Vector3f element = controlPoints.get(i);
         Vector3f over_element = controlPoints.get(i - 1);
         Vector3f over_element = controlPoints.get(i - 1);
-        
+
         controlPoints.set(i - 1, element);
         controlPoints.set(i - 1, element);
         controlPoints.set(i, over_element);
         controlPoints.set(i, over_element);
-        
+
         jmeMotionPath.getMotionPath().getSpline().setType(jmeMotionPath.getMotionPath().getSpline().getType()); // retrigger some internal computations
         jmeMotionPath.getMotionPath().getSpline().setType(jmeMotionPath.getMotionPath().getSpline().getType()); // retrigger some internal computations
-        
+
         refreshChildren(true);
         refreshChildren(true);
         jmeMotionPath.updateSpline(true);
         jmeMotionPath.updateSpline(true);
     }
     }
 
 
     /**
     /**
      * Move an element down
      * Move an element down
+     *
      * @param i index of element to move down
      * @param i index of element to move down
      */
      */
     @Override
     @Override
     public void moveDown(int i) {
     public void moveDown(int i) {
         super.moveDown(i);
         super.moveDown(i);
         List<Vector3f> controlPoints = jmeMotionPath.getMotionPath().getSpline().getControlPoints();
         List<Vector3f> controlPoints = jmeMotionPath.getMotionPath().getSpline().getControlPoints();
-        
-        if (i < 0 || i >= controlPoints.size())
+
+        if (i < 0 || i >= controlPoints.size()) {
             throw new IndexOutOfBoundsException();
             throw new IndexOutOfBoundsException();
-        
+        }
+
         Vector3f element = controlPoints.get(i);
         Vector3f element = controlPoints.get(i);
         Vector3f under_element = controlPoints.get(i + 1);
         Vector3f under_element = controlPoints.get(i + 1);
-        
+
         controlPoints.set(i + 1, element);
         controlPoints.set(i + 1, element);
         controlPoints.set(i, under_element);
         controlPoints.set(i, under_element);
-        
+
         jmeMotionPath.getMotionPath().getSpline().setType(jmeMotionPath.getMotionPath().getSpline().getType()); // retrigger some internal computations
         jmeMotionPath.getMotionPath().getSpline().setType(jmeMotionPath.getMotionPath().getSpline().getType()); // retrigger some internal computations
-        
-        
+
         refreshChildren(true);
         refreshChildren(true);
         jmeMotionPath.updateSpline(true);
         jmeMotionPath.updateSpline(true);
     }
     }

+ 45 - 6
jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/DarkMonkeyLookAndFeel.java

@@ -8,8 +8,8 @@ package org.jme3.netbeans.plaf.darkmonkey;
 import com.nilo.plaf.nimrod.NimRODTheme;
 import com.nilo.plaf.nimrod.NimRODTheme;
 import java.awt.Color;
 import java.awt.Color;
 import java.awt.Font;
 import java.awt.Font;
+import java.util.prefs.Preferences;
 import javax.swing.UIDefaults;
 import javax.swing.UIDefaults;
-import javax.swing.UIManager;
 import org.openide.util.NbPreferences;
 import org.openide.util.NbPreferences;
 
 
 /**
 /**
@@ -49,6 +49,27 @@ public class DarkMonkeyLookAndFeel extends com.nilo.plaf.nimrod.NimRODLookAndFee
                     case "yellow":
                     case "yellow":
                         setCurrentTheme(getYellowTheme());
                         setCurrentTheme(getYellowTheme());
                         break;
                         break;
+                    
+                    case "yellow-two":
+                        setCurrentTheme(getYellowTwoTheme());
+                        break;
+                        
+                    case "manual":
+                        NimRODTheme nt = new NimRODTheme();
+                        Preferences pref = NbPreferences.root().node("laf");
+                        nt.setBlack(Color.decode(pref.get("darkmonkey.color.black", "#E8EAE0")));
+                        nt.setWhite(Color.decode(pref.get("darkmonkey.color.white", "#373737")));
+                        nt.setPrimary1(Color.decode(pref.get("darkmonkey.color.primary1", "#1A28BD")));
+                        nt.setPrimary2(Color.decode(pref.get("darkmonkey.color.primary2", "#233FB0")));
+                        nt.setPrimary3(Color.decode(pref.get("darkmonkey.color.primary3", "#3AA5F2")));
+                        nt.setSecondary1(Color.decode(pref.get("darkmonkey.color.secondary1", "#303030")));
+                        nt.setSecondary2(Color.decode(pref.get("darkmonkey.color.secondary2", "#3A3A3A")));
+                        nt.setSecondary3(Color.decode(pref.get("darkmonkey.color.secondary3", "#515151")));
+                        nt.setFrameOpacity(180);
+                        nt.setMenuOpacity(219);
+                        nt.setFont(Font.decode("DejaVu Sans Condensed-PLAIN-12"));
+                        setCurrentTheme(nt);
+                        break;
                         
                         
                     case "legacy":
                     case "legacy":
                         setCurrentTheme(getLegacyTheme());
                         setCurrentTheme(getLegacyTheme());
@@ -64,7 +85,6 @@ public class DarkMonkeyLookAndFeel extends com.nilo.plaf.nimrod.NimRODLookAndFee
         } catch (Exception e) {
         } catch (Exception e) {
             setCurrentTheme(getBlueTheme());
             setCurrentTheme(getBlueTheme());
         }
         }
-
     }
     }
     
     
     /**
     /**
@@ -90,7 +110,7 @@ public class DarkMonkeyLookAndFeel extends com.nilo.plaf.nimrod.NimRODLookAndFee
 
 
     /**
     /**
      * This method override, getDescription() returns the String 
      * This method override, getDescription() returns the String 
-     * "Look and Feel DarkMonkey - 2015, based on NimROD 2007" for 
+     * "Look and Feel DarkMonkey - 2016, based on NimROD 2007" for 
      * instances of future programming that might use it as a tool tip or 
      * instances of future programming that might use it as a tool tip or 
      * small descriptor in their Look and Feel modules.
      * small descriptor in their Look and Feel modules.
      * @return String "Look and Feel DarkMonkey - 2016, based on NimROD 2007"
      * @return String "Look and Feel DarkMonkey - 2016, based on NimROD 2007"
@@ -104,6 +124,7 @@ public class DarkMonkeyLookAndFeel extends com.nilo.plaf.nimrod.NimRODLookAndFee
     @Override
     @Override
     protected void initClassDefaults( UIDefaults table) {
     protected void initClassDefaults( UIDefaults table) {
         super.initClassDefaults( table);
         super.initClassDefaults( table);
+        // MenuBarUI currently doesn't compile table.put("MenuBarUI", "org.jme3.netbeans.plaf.darkmonkey.components.MenuBarUI");
         /*
         /*
         for( Enumeration en = table.keys(); en.hasMoreElements(); ) {
         for( Enumeration en = table.keys(); en.hasMoreElements(); ) {
             System.out.println( "[" + en.nextElement() + "]");
             System.out.println( "[" + en.nextElement() + "]");
@@ -166,6 +187,24 @@ public class DarkMonkeyLookAndFeel extends com.nilo.plaf.nimrod.NimRODLookAndFee
         return nt;
         return nt;
     }
     }
     
     
+    private NimRODTheme getYellowTwoTheme() {
+        NimRODTheme nt = new NimRODTheme();
+        
+        nt.setBlack(Color.decode("#F3C802")); // Font Foreground
+        nt.setWhite(Color.decode("#262626")); // Font Background
+        nt.setPrimary1(Color.decode("#2040D0")); // Surrounds Bars and Shortcuts
+        nt.setPrimary2(Color.decode("#1D3DBF")); // mainly used for bars 
+        nt.setPrimary3(Color.decode("#1D3DBF")); // e.g. for open tabs (Application)
+        nt.setSecondary1(Color.decode("#000000")); // Outlines, some decoration and tooltips for disabled buttons
+        nt.setSecondary2(Color.decode("#A6A086")); // Selected inactive things (and disabled text)
+        nt.setSecondary3(Color.decode("#323232")); // Unselected Frames (and general background color)
+        nt.setFrameOpacity(180);
+        nt.setMenuOpacity(219);
+        nt.setFont(Font.decode("DejaVu Sans Condensed-PLAIN-12"));
+        
+        return nt;
+    }
+    
     /**
     /**
      * This is the Legacy Theme. It's the one that DarkMonkey had before alpha-4
      * This is the Legacy Theme. It's the one that DarkMonkey had before alpha-4
      * @return 
      * @return 
@@ -200,9 +239,9 @@ public class DarkMonkeyLookAndFeel extends com.nilo.plaf.nimrod.NimRODLookAndFee
         nt.setPrimary1(Color.decode("#FF0000")); // Surrounds Bars and Shortcuts
         nt.setPrimary1(Color.decode("#FF0000")); // Surrounds Bars and Shortcuts
         nt.setPrimary2(Color.decode("#00FF00")); // mainly used for bars 
         nt.setPrimary2(Color.decode("#00FF00")); // mainly used for bars 
         nt.setPrimary3(Color.decode("#0000FF")); // e.g. for open tabs (Application)
         nt.setPrimary3(Color.decode("#0000FF")); // e.g. for open tabs (Application)
-        nt.setSecondary1(Color.decode("#00FF00")); // Selected Things
-        nt.setSecondary2(Color.decode("#FF0000")); // Selected inactive Things
-        nt.setSecondary3(Color.decode("#0000FF")); // Unselected Frames
+        nt.setSecondary1(Color.decode("#FFFF00")); // Outlines, some decoration and tooltips for disabled buttons
+        nt.setSecondary2(Color.decode("#FF00FF")); // Selected inactive things (and disabled text)
+        nt.setSecondary3(Color.decode("#00FFFF")); // Unselected Frames
         nt.setFrameOpacity(180);
         nt.setFrameOpacity(180);
         nt.setMenuOpacity(219);
         nt.setMenuOpacity(219);
         nt.setFont(Font.decode("DejaVu Sans Condensed-PLAIN-12"));
         nt.setFont(Font.decode("DejaVu Sans Condensed-PLAIN-12"));

+ 53 - 0
jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/components/MenuBarUI.java

@@ -0,0 +1,53 @@
+/*package org.jme3.netbeans.plaf.darkmonkey.components;
+
+import com.apple.laf.AquaMenuBarUI;
+import java.awt.*;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.swing.*;
+import javax.swing.plaf.*;
+import org.jme3.netbeans.plaf.darkmonkey.DarkMonkeyLookAndFeel;
+
+public class MenuBarUI extends AquaMenuBarUI {
+  public static ComponentUI createUI( JComponent x) {
+    MenuBarUI a = new MenuBarUI();
+    a.ProcessAppleControl(null);
+    return a;
+  }
+  
+  // Thanks to bloodwalker for this
+  private void ProcessAppleControl(JMenuBar j)
+  {
+   try {
+        Class<?> clazz = Class.forName("com.apple.eawt.Application");
+        Method method = clazz.getMethod("getApplication");
+        Object obj = method.invoke(null);
+        method = clazz.getMethod("setDefaultMenuBar", JMenuBar.class);
+        method.invoke(obj, j); //Your custom MenuBar
+        method = clazz.getMethod("enableSuddenTermination");
+        method.invoke(obj);
+   } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
+        Logger.getLogger(DarkMonkeyLookAndFeel.class.getName()).log(Level.SEVERE, null, ex);
+    }
+}
+
+  public void paint( Graphics g, JComponent c) {
+    super.paint( g, c);
+  }
+
+    @Override
+    public void update(Graphics g, JComponent c) {
+        super.update(g, c);
+        if (c instanceof JMenuBar) {
+            ProcessAppleControl((JMenuBar)c); // For this to work, we HAVE TO extend AquaMenuBarUI
+        }
+    }
+  
+    /* Doesn't work since AquaMenuBarUI isn't found by the default Compiler
+    @Override
+    boolean setScreenMenuBar(final JFrame jframe) {
+        return false;
+    }*/
+//}

+ 5 - 5
jme3-dark-laf/src/org/jme3/netbeans/plaf/darkmonkey/fac/DarkMonkeyFAC-text-x-glsl-token.xml

@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE fontscolors PUBLIC "-//NetBeans//DTD Editor Fonts and Colors settings 1.1//EN" "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd">
 <!DOCTYPE fontscolors PUBLIC "-//NetBeans//DTD Editor Fonts and Colors settings 1.1//EN" "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd">
 <fontscolors>
 <fontscolors>
-    <fontcolor default="preprocessor" foreColor="ffc46200" name="preprocessor"/>
+    <fontcolor default="preprocessor" foreColor="ffE67300" name="preprocessor"/>
     <fontcolor default="error" foreColor="white" name="error" waveUnderlined="ffff3300"/>
     <fontcolor default="error" foreColor="white" name="error" waveUnderlined="ffff3300"/>
-    <fontcolor default="basictype" foreColor="ff4b9393" name="basictype"/>
+    <fontcolor default="basictype" foreColor="ff46EBEB" name="basictype"/>
     <fontcolor default="builtinvar" foreColor="ff8080ff" name="builtinvar"/>
     <fontcolor default="builtinvar" foreColor="ff8080ff" name="builtinvar"/>
-    <fontcolor default="string" foreColor="ff808000" name="string"/>
-    <fontcolor default="keyword" foreColor="ff0080ff" name="keyword"/>
+    <fontcolor default="string" foreColor="ffFADD00" name="string"/>
+    <fontcolor default="keyword" foreColor="ff004CFF" name="keyword"/>
     <fontcolor default="whitespace" foreColor="black" name="whitespace"/>
     <fontcolor default="whitespace" foreColor="black" name="whitespace"/>
     <fontcolor default="number" foreColor="magenta" name="number"/>
     <fontcolor default="number" foreColor="magenta" name="number"/>
     <fontcolor default="comment" foreColor="ff00934a" name="comment"/>
     <fontcolor default="comment" foreColor="ff00934a" name="comment"/>
-    <fontcolor default="identifier" foreColor="lightGray" name="identifier"/>
+    <fontcolor default="identifier" foreColor="white" name="identifier"/>
     <fontcolor default="builtinfunc" foreColor="ffff8040" name="builtinfunc"/>
     <fontcolor default="builtinfunc" foreColor="ffff8040" name="builtinfunc"/>
     <fontcolor default="operator" foreColor="white" name="operator"/>
     <fontcolor default="operator" foreColor="white" name="operator"/>
 </fontscolors>
 </fontscolors>

+ 3 - 1
jme3-desktop-executables/src/com/jme3/gde/desktop/executables/Bundle.properties

@@ -9,8 +9,10 @@ DesktopExeCustomizerPanel.jCheckBox1.text=Create Windows 32bit Application
 DesktopExeCustomizerPanel.jCheckBox2.text=Create Windows 64bit Application
 DesktopExeCustomizerPanel.jCheckBox2.text=Create Windows 64bit Application
 DesktopExeCustomizerPanel.jCheckBox3.text=Create Linux 32bit Application
 DesktopExeCustomizerPanel.jCheckBox3.text=Create Linux 32bit Application
 DesktopExeCustomizerPanel.jLabel1.text=Select platforms to create launchers for
 DesktopExeCustomizerPanel.jLabel1.text=Select platforms to create launchers for
-DesktopExeCustomizerPanel.jTextArea1.text=You can further configure the application launchers (icons etc.) by modifying the templates in the resources folder.\n\nWhen you select to bundle the JRE with the applications the SDK will download the JREs for each platform, wait until the JREs are downloaded before building your application.\n\nThe command line options entered in the "Run" tab (e.g. to set the memory limits for the application) will automatically be added to the launchers.\n\nNote that the Linux and Mac launcher zips contain extended file info (executable bit) that gets lost and breaks the application if you re-zip it on the Windows OS.
+DesktopExeCustomizerPanel.jTextArea1.text=You can further configure the application launchers (icons etc.) by modifying the templates in the resources folder.\n\nWhen you select to bundle the JRE with the applications the SDK will download the JREs for each platform, wait until the JREs are downloaded before building your application.\n\nThe command line options entered in the "Run" tab (e.g. to set the memory limits for the application) will automatically be added to the launchers.\n\nNote that the Linux and Mac launcher zips contain extended file info (executable bit) that gets lost and breaks the application if you re-zip it on the Windows OS.\n\nThe JRE Version Field: In most cases you can leave this blank.\nThe Installer will then download the JRE Version it is run with.\nIf you run an older JRE Version (i.e. with an outdated SDK) or\nif you want a specific Version to fight bugs, use the JRE Version Field above.\nUse a String like 1.8.0_73-b02 for the Version
 DesktopExeCustomizerPanel.jCheckBox4.text=Create Linux 64bit Application
 DesktopExeCustomizerPanel.jCheckBox4.text=Create Linux 64bit Application
 DesktopExeCustomizerPanel.jCheckBox5.text=Create MacOSX Application
 DesktopExeCustomizerPanel.jCheckBox5.text=Create MacOSX Application
 DesktopExeCustomizerPanel.jCheckBox6.text=Bundle JRE with Applications
 DesktopExeCustomizerPanel.jCheckBox6.text=Bundle JRE with Applications
 DesktopExeCustomizerPanel.jCheckBox6.toolTipText=Downloads a JRE for each platform that will be bundled with the Application so it can be run without a Java installation.
 DesktopExeCustomizerPanel.jCheckBox6.toolTipText=Downloads a JRE for each platform that will be bundled with the Application so it can be run without a Java installation.
+DesktopExeCustomizerPanel.jTextField1.text=
+DesktopExeCustomizerPanel.jLabel2.text=JRE Version

+ 11 - 8
jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCompositeProvider.java

@@ -34,7 +34,8 @@ public class DesktopExeCompositeProvider implements ProjectCustomizer.CompositeC
         "linux-x86.app.enabled",
         "linux-x86.app.enabled",
         "linux-x64.app.enabled",
         "linux-x64.app.enabled",
         "macosx-x64.app.enabled",
         "macosx-x64.app.enabled",
-        "bundle.jre.enabled"
+        "bundle.jre.enabled",
+        "bundle.jre.version"
     };
     };
 
 
     public DesktopExeCompositeProvider() {
     public DesktopExeCompositeProvider() {
@@ -76,12 +77,12 @@ public class DesktopExeCompositeProvider implements ProjectCustomizer.CompositeC
                     || "true".equals(properties.getProperty("macosx-x64.app.enabled"))) {
                     || "true".equals(properties.getProperty("macosx-x64.app.enabled"))) {
                 desktopDeployment.loadTargets("nbres:/com/jme3/gde/desktop/executables/desktop-deployment-targets.xml");
                 desktopDeployment.loadTargets("nbres:/com/jme3/gde/desktop/executables/desktop-deployment-targets.xml");
                 desktopDeployment.checkExtension(project);
                 desktopDeployment.checkExtension(project);
-                if("true".equals(properties.getProperty("bundle.jre.enabled"))){
+                if ("true".equals(properties.getProperty("bundle.jre.enabled"))) {
                     checkJreDownloads();
                     checkJreDownloads();
                 }
                 }
             } else {
             } else {
                 desktopDeployment.removeExtension(project);
                 desktopDeployment.removeExtension(project);
-                
+
             }
             }
 
 
             try {
             try {
@@ -93,12 +94,14 @@ public class DesktopExeCompositeProvider implements ProjectCustomizer.CompositeC
 
 
         public void checkJreDownloads() {
         public void checkJreDownloads() {
             String projectPath = project.getProjectDirectory().getPath();
             String projectPath = project.getProjectDirectory().getPath();
+            String jreVersion = properties.getProperty("bundle.jre.version");
+
             if ("true".equals(properties.getProperty("windows-x86.app.enabled"))) {
             if ("true".equals(properties.getProperty("windows-x86.app.enabled"))) {
                 String jreName = projectPath + File.separator + "resources"
                 String jreName = projectPath + File.separator + "resources"
                         + File.separator + "desktop-deployment"
                         + File.separator + "desktop-deployment"
                         + File.separator + "jre-windows-x86.tar.gz";
                         + File.separator + "jre-windows-x86.tar.gz";
                 if (!new File(jreName).exists()) {
                 if (!new File(jreName).exists()) {
-                    JreDownloader.downloadJre("windows-i586", jreName);
+                    JreDownloader.downloadJre(jreVersion, "windows-i586", jreName);
                 }
                 }
             }
             }
             if ("true".equals(properties.getProperty("windows-x64.app.enabled"))) {
             if ("true".equals(properties.getProperty("windows-x64.app.enabled"))) {
@@ -106,7 +109,7 @@ public class DesktopExeCompositeProvider implements ProjectCustomizer.CompositeC
                         + File.separator + "desktop-deployment"
                         + File.separator + "desktop-deployment"
                         + File.separator + "jre-windows-x64.tar.gz";
                         + File.separator + "jre-windows-x64.tar.gz";
                 if (!new File(jreName).exists()) {
                 if (!new File(jreName).exists()) {
-                    JreDownloader.downloadJre("windows-x64", jreName);
+                    JreDownloader.downloadJre(jreVersion, "windows-x64", jreName);
                 }
                 }
             }
             }
             if ("true".equals(properties.getProperty("linux-x86.app.enabled"))) {
             if ("true".equals(properties.getProperty("linux-x86.app.enabled"))) {
@@ -114,7 +117,7 @@ public class DesktopExeCompositeProvider implements ProjectCustomizer.CompositeC
                         + File.separator + "desktop-deployment"
                         + File.separator + "desktop-deployment"
                         + File.separator + "jre-linux-x86.tar.gz";
                         + File.separator + "jre-linux-x86.tar.gz";
                 if (!new File(jreName).exists()) {
                 if (!new File(jreName).exists()) {
-                    JreDownloader.downloadJre("linux-i586", jreName);
+                    JreDownloader.downloadJre(jreVersion, "linux-i586", jreName);
                 }
                 }
             }
             }
             if ("true".equals(properties.getProperty("linux-x64.app.enabled"))) {
             if ("true".equals(properties.getProperty("linux-x64.app.enabled"))) {
@@ -122,7 +125,7 @@ public class DesktopExeCompositeProvider implements ProjectCustomizer.CompositeC
                         + File.separator + "desktop-deployment"
                         + File.separator + "desktop-deployment"
                         + File.separator + "jre-linux-x64.tar.gz";
                         + File.separator + "jre-linux-x64.tar.gz";
                 if (!new File(jreName).exists()) {
                 if (!new File(jreName).exists()) {
-                    JreDownloader.downloadJre("linux-x64", jreName);
+                    JreDownloader.downloadJre(jreVersion, "linux-x64", jreName);
                 }
                 }
             }
             }
             if ("true".equals(properties.getProperty("macosx-x64.app.enabled"))) {
             if ("true".equals(properties.getProperty("macosx-x64.app.enabled"))) {
@@ -130,7 +133,7 @@ public class DesktopExeCompositeProvider implements ProjectCustomizer.CompositeC
                         + File.separator + "desktop-deployment"
                         + File.separator + "desktop-deployment"
                         + File.separator + "jre-macosx-x64.tar.gz";
                         + File.separator + "jre-macosx-x64.tar.gz";
                 if (!new File(jreName).exists()) {
                 if (!new File(jreName).exists()) {
-                    JreDownloader.downloadJre("macosx-x64", jreName);
+                    JreDownloader.downloadJre(jreVersion, "macosx-x64", jreName);
                 }
                 }
             }
             }
         }
         }

+ 27 - 1
jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCustomizerPanel.form

@@ -32,6 +32,13 @@
               </Group>
               </Group>
               <EmptySpace max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
           </Group>
           </Group>
+          <Group type="102" alignment="1" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
+              <EmptySpace type="separate" max="-2" attributes="0"/>
+              <Component id="jTextField1" min="-2" pref="200" max="-2" attributes="0"/>
+              <EmptySpace max="32767" attributes="0"/>
+          </Group>
       </Group>
       </Group>
     </DimensionLayout>
     </DimensionLayout>
     <DimensionLayout dim="1">
     <DimensionLayout dim="1">
@@ -51,7 +58,12 @@
               <EmptySpace max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
               <Component id="jCheckBox6" min="-2" max="-2" attributes="0"/>
               <Component id="jCheckBox6" min="-2" max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
-              <Component id="jScrollPane1" pref="129" max="32767" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
+              <Component id="jScrollPane1" pref="189" max="32767" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
           </Group>
           </Group>
       </Group>
       </Group>
@@ -134,5 +146,19 @@
         </Property>
         </Property>
       </Properties>
       </Properties>
     </Component>
     </Component>
+    <Component class="javax.swing.JTextField" name="jTextField1">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="com/jme3/gde/desktop/executables/Bundle.properties" key="DesktopExeCustomizerPanel.jTextField1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel2">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="com/jme3/gde/desktop/executables/Bundle.properties" key="DesktopExeCustomizerPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
   </SubComponents>
   </SubComponents>
 </Form>
 </Form>

+ 32 - 7
jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCustomizerPanel.java

@@ -3,7 +3,7 @@
  * and open the template in the editor.
  * and open the template in the editor.
  */
  */
 
 
-/*
+ /*
  * LwjglAppletCustomizerPanel.java
  * LwjglAppletCustomizerPanel.java
  *
  *
  * Created on 11.11.2010, 16:56:53
  * Created on 11.11.2010, 16:56:53
@@ -23,7 +23,9 @@ public class DesktopExeCustomizerPanel extends javax.swing.JPanel implements Act
 
 
     private ProjectExtensionProperties properties;
     private ProjectExtensionProperties properties;
 
 
-    /** Creates new form LwjglAppletCustomizerPanel */
+    /**
+     * Creates new form LwjglAppletCustomizerPanel
+     */
     public DesktopExeCustomizerPanel(ProjectExtensionProperties properties) {
     public DesktopExeCustomizerPanel(ProjectExtensionProperties properties) {
         this.properties = properties;
         this.properties = properties;
         initComponents();
         initComponents();
@@ -101,16 +103,21 @@ public class DesktopExeCustomizerPanel extends javax.swing.JPanel implements Act
         } else {
         } else {
             properties.setProperty("bundle.jre.enabled", "");
             properties.setProperty("bundle.jre.enabled", "");
         }
         }
+        if (!jTextField1.getText().equals("")) {
+            properties.setProperty("bundle.jre.version", jTextField1.getText());
+        } else {
+            properties.setProperty("bundle.jre.version", null);
+        }
     }
     }
 
 
     public void actionPerformed(ActionEvent e) {
     public void actionPerformed(ActionEvent e) {
         saveProperties();
         saveProperties();
     }
     }
 
 
-    /** This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
+    /**
+     * This method is called from within the constructor to initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is always
+     * regenerated by the Form Editor.
      */
      */
     @SuppressWarnings("unchecked")
     @SuppressWarnings("unchecked")
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
@@ -125,6 +132,8 @@ public class DesktopExeCustomizerPanel extends javax.swing.JPanel implements Act
         jCheckBox4 = new javax.swing.JCheckBox();
         jCheckBox4 = new javax.swing.JCheckBox();
         jCheckBox5 = new javax.swing.JCheckBox();
         jCheckBox5 = new javax.swing.JCheckBox();
         jCheckBox6 = new javax.swing.JCheckBox();
         jCheckBox6 = new javax.swing.JCheckBox();
+        jTextField1 = new javax.swing.JTextField();
+        jLabel2 = new javax.swing.JLabel();
 
 
         jCheckBox1.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jCheckBox1.text")); // NOI18N
         jCheckBox1.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jCheckBox1.text")); // NOI18N
 
 
@@ -150,6 +159,10 @@ public class DesktopExeCustomizerPanel extends javax.swing.JPanel implements Act
         jCheckBox6.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jCheckBox6.text")); // NOI18N
         jCheckBox6.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jCheckBox6.text")); // NOI18N
         jCheckBox6.setToolTipText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jCheckBox6.toolTipText")); // NOI18N
         jCheckBox6.setToolTipText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jCheckBox6.toolTipText")); // NOI18N
 
 
+        jTextField1.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jTextField1.text")); // NOI18N
+
+        jLabel2.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jLabel2.text")); // NOI18N
+
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
         this.setLayout(layout);
         this.setLayout(layout);
         layout.setHorizontalGroup(
         layout.setHorizontalGroup(
@@ -167,6 +180,12 @@ public class DesktopExeCustomizerPanel extends javax.swing.JPanel implements Act
                     .addComponent(jCheckBox5, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE)
                     .addComponent(jCheckBox5, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE)
                     .addComponent(jCheckBox6, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE))
                     .addComponent(jCheckBox6, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE))
                 .addContainerGap())
                 .addContainerGap())
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(jLabel2)
+                .addGap(18, 18, 18)
+                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
         );
         );
         layout.setVerticalGroup(
         layout.setVerticalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -185,7 +204,11 @@ public class DesktopExeCustomizerPanel extends javax.swing.JPanel implements Act
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                 .addComponent(jCheckBox6)
                 .addComponent(jCheckBox6)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(jLabel2))
+                .addGap(12, 12, 12)
+                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)
                 .addContainerGap())
                 .addContainerGap())
         );
         );
     }// </editor-fold>//GEN-END:initComponents
     }// </editor-fold>//GEN-END:initComponents
@@ -198,7 +221,9 @@ public class DesktopExeCustomizerPanel extends javax.swing.JPanel implements Act
     private javax.swing.JCheckBox jCheckBox5;
     private javax.swing.JCheckBox jCheckBox5;
     private javax.swing.JCheckBox jCheckBox6;
     private javax.swing.JCheckBox jCheckBox6;
     private javax.swing.JLabel jLabel1;
     private javax.swing.JLabel jLabel1;
+    private javax.swing.JLabel jLabel2;
     private javax.swing.JScrollPane jScrollPane1;
     private javax.swing.JScrollPane jScrollPane1;
     private javax.swing.JTextArea jTextArea1;
     private javax.swing.JTextArea jTextArea1;
+    private javax.swing.JTextField jTextField1;
     // End of variables declaration//GEN-END:variables
     // End of variables declaration//GEN-END:variables
 }
 }

+ 29 - 10
jme3-desktop-executables/src/com/jme3/gde/desktop/executables/JreDownloader.java

@@ -31,6 +31,7 @@
  */
  */
 package com.jme3.gde.desktop.executables;
 package com.jme3.gde.desktop.executables;
 
 
+import com.jme3.gde.core.util.notify.MessageUtil;
 import java.io.BufferedInputStream;
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.File;
@@ -64,21 +65,30 @@ public class JreDownloader {
      * Download a specific platforms JRE to the location specified, a tar.gz
      * Download a specific platforms JRE to the location specified, a tar.gz
      * file will be downloaded so the location parameter should end with tar.gz
      * file will be downloaded so the location parameter should end with tar.gz
      *
      *
+     * @param jreVersion The Version to use. If null, we'll use the System JRE
+     * Version
      * @param platform The platform to download for (windows-i586, windows-x64,
      * @param platform The platform to download for (windows-i586, windows-x64,
      * linux-i586, linux-x64, maxosx-x64)
      * linux-i586, linux-x64, maxosx-x64)
      * @param location The absolute file path to download to.
      * @param location The absolute file path to download to.
      */
      */
-    public static void downloadJre(String platform, String location) {
-        String property = System.getProperty("java.runtime.version");
+    public static void downloadJre(String jreVersion, String platform, String location) {
+        String property; // The JRE Version
+
+        if (jreVersion == null) {
+            property = System.getProperty("java.runtime.version");
+        } else {
+            property = jreVersion;
+        }
+
         Matcher m = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)_(\\d+)\\-b(\\d+)").matcher(property);
         Matcher m = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)_(\\d+)\\-b(\\d+)").matcher(property);
         if (m.matches()) {
         if (m.matches()) {
 //            "http://download.oracle.com/otn-pub/java/jdk/${jv.minor}u${jv.update}-b${jv.build}/jre-${jv.minor}u${jv.update}-${platform.durl}.tar.gz";
 //            "http://download.oracle.com/otn-pub/java/jdk/${jv.minor}u${jv.update}-b${jv.build}/jre-${jv.minor}u${jv.update}-${platform.durl}.tar.gz";
             String urlString = "http://download.oracle.com/otn-pub/java/jdk/" + m.group(2) + "u" + m.group(4) + "-b" + m.group(5) + "/jre-" + m.group(2) + "u" + m.group(4) + "-" + platform + ".tar.gz";
             String urlString = "http://download.oracle.com/otn-pub/java/jdk/" + m.group(2) + "u" + m.group(4) + "-b" + m.group(5) + "/jre-" + m.group(2) + "u" + m.group(4) + "-" + platform + ".tar.gz";
-            attemptDownload(urlString, new File(location));
+            attemptDownload(urlString, new File(location), 0);
         }
         }
     }
     }
 
 
-    private static void attemptDownload(String newUrl, File dest) {
+    private static void attemptDownload(String newUrl, File dest, int retry) {
         logger.log(Level.INFO, "Attempt to download JRE from {0}", newUrl);
         logger.log(Level.INFO, "Attempt to download JRE from {0}", newUrl);
         try {
         try {
             HttpURLConnection connection = (HttpURLConnection) new URL(newUrl).openConnection();
             HttpURLConnection connection = (HttpURLConnection) new URL(newUrl).openConnection();
@@ -88,11 +98,14 @@ public class JreDownloader {
             connection.connect();
             connection.connect();
             int status = connection.getResponseCode();
             int status = connection.getResponseCode();
             if (status == HttpURLConnection.HTTP_OK) {
             if (status == HttpURLConnection.HTTP_OK) {
-                downloadFile(connection, dest);
+                downloadFile(connection, dest, retry);
             } else if (status == HttpURLConnection.HTTP_MOVED_TEMP || status == HttpURLConnection.HTTP_MOVED_PERM || status == HttpURLConnection.HTTP_SEE_OTHER) {
             } else if (status == HttpURLConnection.HTTP_MOVED_TEMP || status == HttpURLConnection.HTTP_MOVED_PERM || status == HttpURLConnection.HTTP_SEE_OTHER) {
-                handleRedirect(connection, dest);
+                handleRedirect(connection, dest, retry);
+            } else if (status == HttpURLConnection.HTTP_NOT_FOUND) {
+                MessageUtil.error("Download of JRE failed because it was not found.\nMaybe you are running an old Version which isn't available for download anymore?");
+                MessageUtil.error("Go to download.oracle.com and alter the version field in the Project Properties accordingly.\nIf the Problem persists, download the .tar.gz files manually to\n" + dest.getAbsolutePath());
             } else {
             } else {
-                logger.log(Level.WARNING, "Download of JRE from {0} failed", newUrl);
+                logger.log(Level.WARNING, "Download of JRE from {0} failed. HTTP Status Code {1} ", new Object[]{newUrl, status});
             }
             }
         } catch (MalformedURLException ex) {
         } catch (MalformedURLException ex) {
             logger.log(Level.SEVERE, "{0}", ex);
             logger.log(Level.SEVERE, "{0}", ex);
@@ -101,14 +114,14 @@ public class JreDownloader {
         }
         }
     }
     }
 
 
-    private static void handleRedirect(HttpURLConnection conn, File dest) {
+    private static void handleRedirect(HttpURLConnection conn, File dest, int retry) {
         String newUrl = conn.getHeaderField("Location");
         String newUrl = conn.getHeaderField("Location");
         logger.log(Level.INFO, "JRE download redirected to {0}", newUrl);
         logger.log(Level.INFO, "JRE download redirected to {0}", newUrl);
         conn.disconnect();
         conn.disconnect();
-        attemptDownload(newUrl, dest);
+        attemptDownload(newUrl, dest, retry);
     }
     }
 
 
-    private static void downloadFile(final HttpURLConnection connection, final File dest) {
+    private static void downloadFile(final HttpURLConnection connection, final File dest, final int retry) {
         logger.log(Level.INFO, "Downloading JRE from {0}", connection.getURL());
         logger.log(Level.INFO, "Downloading JRE from {0}", connection.getURL());
         Callable task = new Callable() {
         Callable task = new Callable() {
 
 
@@ -129,6 +142,12 @@ public class JreDownloader {
                         progress.progress(i);
                         progress.progress(i);
                         i++;
                         i++;
                     }
                     }
+
+                    if (i < length) {
+                        /* Download Error */
+                        logger.log(Level.WARNING, "Download of JRE got Interrupted. Retrying ({0} of 3)", retry + 1);
+                        attemptDownload(connection.getURL().toString(), dest, retry + 1);
+                    }
                 } catch (IOException ex) {
                 } catch (IOException ex) {
                     logger.log(Level.SEVERE, "{0}", ex);
                     logger.log(Level.SEVERE, "{0}", ex);
                 } finally {
                 } finally {

+ 178 - 0
jme3-ios/build.xml

@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
+<!-- for some information on what you could do (e.g. targets to override). -->
+<!-- If you delete this file and reopen the project it will be recreated. -->
+<project name="com.jme3.gde.ios" default="netbeans" basedir=".">
+    <description>Builds, tests, and runs the project com.jme3.gde.ios.</description>
+    <import file="nbproject/build-impl.xml"/>
+
+    <target name="init" depends="-zip-data,basic-init,files-init,build-init,-javac-init"/>
+    <target name="-zip-data" description="Zips mac stubs">
+        <delete file="src/com/jme3/gde/ios/ios-data.zip"/>
+        <zip destfile="src/com/jme3/gde/ios/ios-data.zip" update="false">
+            <zipfileset dir="ios-data" prefix=""/>
+        </zip>
+    </target>
+    
+    <target name="sources.error" unless="sources.available">
+<echo>Check needed folders:
+JDK binaries: ${avian.jdk.path.exists}
+JDK sources: ${avian.jdk.src.path.exists}
+Avian sources: ${avian.src.path.exists}
+Avian Hello iOS sources: ${hello-ios.src.path.exists}</echo>
+        <fail>Avian or JDK sources not found! Please configure the avian and JDK source locations in the properties file!</fail>
+    </target>
+
+    <target name="sources.check">
+        <condition property="avian.jdk.path.exists" else="false">
+            <available file="${avian.jdk.path}" type="dir"/>
+        </condition>
+        <condition property="avian.jdk.src.path.exists" else="false">
+            <available file="${avian.jdk.src.path}" type="dir"/>
+        </condition>
+        <condition property="avian.src.path.exists" else="false">
+            <available file="${avian.src.path}" type="dir"/>
+        </condition>
+        <condition property="hello-ios.src.path.exists" else="false">
+            <available file="${hello-ios.src.path}" type="dir"/>
+        </condition>
+        <condition property="sources.available">
+            <and>
+                <isTrue value="${avian.jdk.path.exists}"/>
+                <isTrue value="${avian.jdk.src.path.exists}"/>
+                <isTrue value="${avian.src.path.exists}"/>
+                <isTrue value="${hello-ios.src.path.exists}"/>
+            </and>
+        </condition>
+    </target>
+
+    <target name="package-avian" depends="init, sources.check, sources.error" description="Builds and packages the avian library" if="sources.available">
+        <!--echo>Note to build avian you currently need to copy ar, libtool and ranlib
+from XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
+to   XCode.app/Contents/Developer/usr/bin
+        </echo-->
+        <exec executable="make" dir="${avian.src.path}" failonerror="true">
+            <env key="JAVA_HOME" value="${avian.jdk.path}"/>
+            <arg line="clean"/>
+        </exec>
+        <exec executable="make" dir="${avian.src.path}" failonerror="true">
+            <env key="JAVA_HOME" value="${avian.jdk.path}"/>
+            <arg line="arch=arm"/>
+            <arg line="platform=ios"/>
+            <arg line="process=compile"/>
+            <arg line="openjdk='${avian.jdk.path}'"/>
+            <arg line="openjdk-src='${avian.jdk.src.path}'"/>
+            <arg line="bootimage=true"/>
+            <arg line="build/ios-arm-bootimage-openjdk-src/bootimage-generator"/>
+            <arg line="build/ios-arm-bootimage-openjdk-src/binaryToObject/binaryToObject"/>
+            <arg line="build/ios-arm-bootimage-openjdk-src/classpath.jar"/>
+            <arg line="build/ios-arm-bootimage-openjdk-src/libavian.a"/>
+        </exec>
+        <delete file="src/com/jme3/gde/ios/avian-openjdk-mac.zip" failonerror="false"/>
+        <zip destfile="src/com/jme3/gde/ios/avian-openjdk-mac.zip">
+            <zipfileset file="${avian.src.path}/build/ios-arm-bootimage-openjdk-src/bootimage-generator" filemode="755" fullpath="avian-arm/bootimage-generator"/>
+            <zipfileset file="${avian.src.path}/build/ios-arm-bootimage-openjdk-src/binaryToObject/binaryToObject" filemode="755" fullpath="avian-arm/binaryToObject"/>
+            <zipfileset file="${avian.src.path}/build/ios-arm-bootimage-openjdk-src/libavian.a" fullpath="avian-arm/libavian.a"/>
+        </zip>
+        <exec executable="make" dir="${avian.src.path}">
+            <env key="JAVA_HOME" value="${avian.jdk.path}"/>
+            <arg line="clean"/>
+        </exec>
+        <exec executable="make" dir="${avian.src.path}" failonerror="true">
+            <env key="JAVA_HOME" value="${avian.jdk.path}"/>
+            <arg line="arch=arm64"/>
+            <arg line="platform=ios"/>
+            <arg line="process=compile"/>
+            <arg line="openjdk='${avian.jdk.path}'"/>
+            <arg line="openjdk-src='${avian.jdk.src.path}'"/>
+            <arg line="bootimage=true"/>
+            <!--arg line="mode=debug"/-->
+            <arg line="build/ios-arm64-bootimage-openjdk-src/bootimage-generator"/>
+            <arg line="build/ios-arm64-bootimage-openjdk-src/binaryToObject/binaryToObject"/>
+            <arg line="build/ios-arm64-bootimage-openjdk-src/classpath.jar"/>
+            <arg line="build/ios-arm64-bootimage-openjdk-src/libavian.a"/>
+        </exec>
+        <zip destfile="src/com/jme3/gde/ios/avian-openjdk-mac.zip" update="true">
+            <zipfileset file="${avian.src.path}/build/ios-arm64-bootimage-openjdk-src/bootimage-generator" filemode="755" fullpath="avian-arm64/bootimage-generator"/>
+            <zipfileset file="${avian.src.path}/build/ios-arm64-bootimage-openjdk-src/binaryToObject/binaryToObject" filemode="755" fullpath="avian-arm64/binaryToObject"/>
+            <zipfileset file="${avian.src.path}/build/ios-arm64-bootimage-openjdk-src/libavian.a" fullpath="avian-arm64/libavian.a"/>
+            <zipfileset file="${avian.src.path}/vm.pro" fullpath="vm.pro"/>
+            <zipfileset file="${avian.src.path}/openjdk.pro" fullpath="openjdk.pro"/>
+        </zip>
+        <exec executable="make" dir="${avian.src.path}">
+            <env key="JAVA_HOME" value="${avian.jdk.path}"/>
+            <arg line="clean"/>
+        </exec>
+        <exec executable="make" dir="${avian.src.path}" failonerror="true">
+            <env key="JAVA_HOME" value="${avian.jdk.path}"/>
+            <arg line="arch=i386"/>
+            <arg line="platform=ios"/>
+            <arg line="process=compile"/>
+            <arg line="openjdk='${avian.jdk.path}'"/>
+            <arg line="openjdk-src='${avian.jdk.src.path}'"/>
+            <arg line="bootimage=true"/>
+            <arg line="build/ios-i386-bootimage-openjdk-src/bootimage-generator"/>
+            <arg line="build/ios-i386-bootimage-openjdk-src/binaryToObject/binaryToObject"/>
+            <arg line="build/ios-i386-bootimage-openjdk-src/classpath.jar"/>
+            <arg line="build/ios-i386-bootimage-openjdk-src/libavian.a"/>
+        </exec>
+        <zip destfile="src/com/jme3/gde/ios/avian-openjdk-mac.zip" update="true">
+            <zipfileset file="${avian.src.path}/build/ios-i386-bootimage-openjdk-src/bootimage-generator" filemode="755" fullpath="avian-i386/bootimage-generator"/>
+            <zipfileset file="${avian.src.path}/build/ios-i386-bootimage-openjdk-src/binaryToObject/binaryToObject" filemode="755" fullpath="avian-i386/binaryToObject"/>
+            <zipfileset file="${avian.src.path}/build/ios-i386-bootimage-openjdk-src/libavian.a" fullpath="avian-i386/libavian.a"/>
+            <zipfileset file="${avian.src.path}/vm.pro" fullpath="vm.pro"/>
+            <zipfileset file="${avian.src.path}/openjdk.pro" fullpath="openjdk.pro"/>
+        </zip>
+        <zip destfile="src/com/jme3/gde/ios/avian-openjdk-mac.zip" update="true">
+            <zipfileset dir="${avian.src.path}/build/ios-i386-bootimage-openjdk-src/classpath" prefix="classpath/">
+                <exclude name="**/java/awt/**"/>
+                <exclude name="**/apple/**"/>
+                <exclude name="**/javax/swing/**"/>
+                <exclude name="**/javax/sound/**"/>
+                <exclude name="**/javax/smartcardio/**"/>
+                <exclude name="**/sun/applet/**"/>
+                <exclude name="**/sun/audio/**"/>
+                <exclude name="**/sun/awt/**"/>
+                <exclude name="**/sun/corba/**"/>
+                <exclude name="**/sun/font/**"/>
+                <!--exclude name="**/sun/java2d/**"/-->
+                <exclude name="**/sun/lwawt/**"/>
+                <exclude name="**/sun/print/**"/>
+                <exclude name="**/sun/swing/**"/>
+                <exclude name="**/com/oracle/**"/>
+                
+                <!--crypto,demo,rmi,servicetag,tracing-->
+                <!--exclude name="**/com/sun/**"/>
+                <exclude name="**/com/sun/accessibility/**"/>
+                <exclude name="**/com/sun/activation/**"/-->
+                
+                <exclude name="**/com/sun/awt/**"/>
+                
+                <!--exclude name="**/com/sun/beans/**"/>
+                <exclude name="**/com/sun/codemodel/**"/>
+                <exclude name="**/com/sun/corba/**"/>
+                <exclude name="**/com/sun/imageio/**"/>
+                <exclude name="**/com/sun/istack/**"/>
+                <exclude name="**/com/sun/jarsigner/**"/>
+                <exclude name="**/com/sun/java/**"/>
+                <exclude name="**/com/sun/java_cup/**"/>
+                <exclude name="**/com/sun/javadoc/**"/>
+                <exclude name="**/com/sun/jmx/**"/>
+                <exclude name="**/com/sun/jndi/**"/>
+                <exclude name="**/com/sun/management/**"/>
+                <exclude name="**/com/sun/media/**"/>
+                <exclude name="**/com/sun/mirror/**"/>
+                <exclude name="**/com/sun/naming/**"/>
+                <exclude name="**/com/sun/net/**"/>
+                <exclude name="**/com/sun/nio/**"/>
+                <exclude name="**/com/sun/org/**"/>
+                <exclude name="**/com/sun/rowset/**"/>
+                <exclude name="**/com/sun/security/**"/>
+                <exclude name="**/com/sun/source/**"/>
+                <exclude name="**/com/sun/swing/**"/>
+                <exclude name="**/com/sun/tools/**"/>
+                <exclude name="**/com/sun/xml/**"/-->
+            </zipfileset>
+        </zip>
+    </target>
+</project>

+ 82 - 0
jme3-ios/ios-data/templates/ios.properties

@@ -0,0 +1,82 @@
+# Properties file for iOS cross-compilation with Avian / OpenJDK
+
+# these normally don't change
+ios.platform=ios
+ios.arm.flag=armv7
+ios.arm64.flag=arm64
+ios.i386.flag=i386
+
+# java build paths
+ios.build.classpath.dir=build/ios-classpath
+ios.java.classes.dir=${ios.build.classpath.dir}/build
+ios.build.classes.dir=${ios.build.classpath.dir}/classpath
+ios.build.resources.jar=${ios.build.classpath.dir}/resources.jar
+ios.classpath.checkfile=${ios.build.classpath.dir}/.classpath.last
+ios.jar.excludes=jME3-desktop.jar, \
+jME3-blender.jar, \
+jME3-lwjgl.jar, \
+jME3-lwjgl-natives.jar, \
+jME3-bullet-natives.jar, \
+jinput.jar, \
+lwjgl.jar
+ios.classpath.excludes=**/de/lessvoid/nifty/ClipboardAWT.class
+
+# native build paths
+ios.build.arch.dir=build/ios-${ios.arch}
+ios.build.libs.dir=${ios.build.arch.dir}/libs
+ios.build.libs.file=${ios.build.arch.dir}/libs.list
+ios.build.resources.o=${ios.build.libs.dir}/resources-jar.o
+ios.build.bootimage.o=${ios.build.libs.dir}/bootimage-bin.o
+ios.build.codeimage.o=${ios.build.libs.dir}/codeimage-bin.o
+ios.images.checkfile=${ios.build.arch.dir}/.binaries.last
+
+# proguard properties -> adapt these if you get missing classes on iOS
+ios.proguard.vm.path=${ios.avian.path}/vm.pro
+ios.proguard.openjdk.path=${ios.avian.path}/openjdk.pro
+ios.proguard.options=-keep public class com.jme3.system.ios.*{public *;} \
+-keep public class * extends com.jme3.system.ios.IosHarness{public *;} \
+-keep public class * extends com.jme3.app.Application{public *;} \
+-keep public class * extends com.jme3.system.JmeSystemDelegate{public *;} \
+-keep public class * extends com.jme3.scene.control.*{public *;} \
+-keep public class * extends com.jme3.scene.Node{public *;} \
+-keep public class * implements com.jme3.renderer.Renderer{public *;} \
+-keep public class * implements com.jme3.asset.AssetLoader{public *;} \
+-keep public class * implements com.jme3.asset.AssetLocator{public *;} \
+-keep public class * implements de.lessvoid.nifty.screen.ScreenController{public *;} \
+-keep public class * implements javax.xml.parsers.SAXParserFactory{public *;} \
+-keep public class com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl \
+-keep public class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl \
+-keep public class sun.nio.fs.MacOSXFileSystemProvider
+
+# native compile
+ios.cc.source.dir=ios/src
+ios.cc.cache=${ios.build.arch.dir}/.nativebuild.cache
+ios.cc.compiler=clang
+ios.cc.cflags=-D__IPHONE_OS_VERSION_MIN_REQUIRED=30202 \
+-fobjc-abi-version=2 -fobjc-legacy-dispatch \
+-I/System/Library/Frameworks/JavaVM.framework/Headers \
+-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Headers/
+
+# arm/i386 section, resolved in build file to ios.avian.bootimage-generator etc.
+ios.avian.path.arm=${ios.avian.path}/avian-arm
+ios.avian.path.arm64=${ios.avian.path}/avian-arm64
+ios.avian.path.i386=${ios.avian.path}/avian-i386
+ios.avian.arm.classpath=${ios.avian.path}/classpath
+ios.avian.arm64.classpath=${ios.avian.path}/classpath
+ios.avian.i386.classpath=${ios.avian.path}/classpath
+
+ios.avian.arm.bootimage-generator=${ios.avian.path.arm}/bootimage-generator
+ios.avian.arm.generator=${ios.avian.path.arm}/generator
+ios.avian.arm.converter=${ios.avian.path.arm}/binaryToObject
+ios.avian.arm.binary=${ios.avian.path.arm}/libavian.a
+ios.avian.arm64.bootimage-generator=${ios.avian.path.arm64}/bootimage-generator
+ios.avian.arm64.generator=${ios.avian.path.arm64}/generator
+ios.avian.arm64.converter=${ios.avian.path.arm64}/binaryToObject
+ios.avian.arm64.binary=${ios.avian.path.arm64}/libavian.a
+ios.avian.i386.bootimage-generator=${ios.avian.path.i386}/bootimage-generator
+ios.avian.i386.generator=${ios.avian.path.i386}/generator
+ios.avian.i386.converter=${ios.avian.path.i386}/binaryToObject
+ios.avian.i386.binary=${ios.avian.path.i386}/libavian.a
+
+# XCode project
+ios.xcode.project.dir=ios/project

+ 391 - 0
jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/project.pbxproj

@@ -0,0 +1,391 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		08914C09142A826B00991C80 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08914C08142A826B00991C80 /* UIKit.framework */; };
+		08914C0B142A826B00991C80 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08914C0A142A826B00991C80 /* Foundation.framework */; };
+		08914C0D142A826B00991C80 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08914C0C142A826B00991C80 /* CoreGraphics.framework */; };
+		08914C13142A826B00991C80 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 08914C11142A826B00991C80 /* InfoPlist.strings */; };
+		08914C15142A826B00991C80 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 08914C14142A826B00991C80 /* main.m */; };
+		08914C19142A826B00991C80 /* jmeAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 08914C18142A826B00991C80 /* jmeAppDelegate.m */; };
+		08914C1D142A826B00991C80 /* jmeAppDelegate_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = 08914C1C142A826B00991C80 /* jmeAppDelegate_iPhone.m */; };
+		08914C20142A826B00991C80 /* MainWindow_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 08914C1E142A826B00991C80 /* MainWindow_iPhone.xib */; };
+		08914C24142A826B00991C80 /* jmeAppDelegate_iPad.m in Sources */ = {isa = PBXBuildFile; fileRef = 08914C23142A826B00991C80 /* jmeAppDelegate_iPad.m */; };
+		08914C27142A826B00991C80 /* MainWindow_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 08914C25142A826B00991C80 /* MainWindow_iPad.xib */; };
+		CC69FB0F16374681009585B5 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC69FB0E16374681009585B5 /* OpenGLES.framework */; };
+		CCD3ADB518AC38BE00FE8DC5 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCD3ADB418AC38BE00FE8DC5 /* OpenAL.framework */; };
+		CCFD653F163755D80020EFDD /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCFD653E163755D80020EFDD /* GLKit.framework */; };
+		E9E6261018A052130084FC12 /* logging.properties in Resources */ = {isa = PBXBuildFile; fileRef = E9E6260F18A052130084FC12 /* logging.properties */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		08914C04142A826B00991C80 /* jme-ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "jme-ios.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		08914C08142A826B00991C80 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		08914C0A142A826B00991C80 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		08914C0C142A826B00991C80 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		08914C10142A826B00991C80 /* jme-ios-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "jme-ios-Info.plist"; sourceTree = "<group>"; };
+		08914C12142A826B00991C80 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		08914C14142A826B00991C80 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		08914C16142A826B00991C80 /* jme-ios-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "jme-ios-Prefix.pch"; sourceTree = "<group>"; };
+		08914C17142A826B00991C80 /* jmeAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jmeAppDelegate.h; sourceTree = "<group>"; };
+		08914C18142A826B00991C80 /* jmeAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = jmeAppDelegate.m; sourceTree = "<group>"; };
+		08914C1B142A826B00991C80 /* jmeAppDelegate_iPhone.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jmeAppDelegate_iPhone.h; path = iPhone/jmeAppDelegate_iPhone.h; sourceTree = "<group>"; };
+		08914C1C142A826B00991C80 /* jmeAppDelegate_iPhone.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = jmeAppDelegate_iPhone.m; path = iPhone/jmeAppDelegate_iPhone.m; sourceTree = "<group>"; };
+		08914C1F142A826B00991C80 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = iPhone/en.lproj/MainWindow_iPhone.xib; sourceTree = "<group>"; };
+		08914C22142A826B00991C80 /* jmeAppDelegate_iPad.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jmeAppDelegate_iPad.h; path = iPad/jmeAppDelegate_iPad.h; sourceTree = "<group>"; };
+		08914C23142A826B00991C80 /* jmeAppDelegate_iPad.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = jmeAppDelegate_iPad.m; path = iPad/jmeAppDelegate_iPad.m; sourceTree = "<group>"; };
+		08914C26142A826B00991C80 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = iPad/en.lproj/MainWindow_iPad.xib; sourceTree = "<group>"; };
+		CC69FB0E16374681009585B5 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
+		CCD3ADB418AC38BE00FE8DC5 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
+		CCFD653E163755D80020EFDD /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
+		E9E6260F18A052130084FC12 /* logging.properties */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = logging.properties; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		08914C01142A826B00991C80 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				08914C09142A826B00991C80 /* UIKit.framework in Frameworks */,
+				08914C0B142A826B00991C80 /* Foundation.framework in Frameworks */,
+				08914C0D142A826B00991C80 /* CoreGraphics.framework in Frameworks */,
+				CCD3ADB518AC38BE00FE8DC5 /* OpenAL.framework in Frameworks */,
+				CC69FB0F16374681009585B5 /* OpenGLES.framework in Frameworks */,
+				CCFD653F163755D80020EFDD /* GLKit.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		08914BF9142A826B00991C80 = {
+			isa = PBXGroup;
+			children = (
+				08914C0E142A826B00991C80 /* jme-ios */,
+				08914C07142A826B00991C80 /* Frameworks */,
+				08914C05142A826B00991C80 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		08914C05142A826B00991C80 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				08914C04142A826B00991C80 /* jme-ios.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		08914C07142A826B00991C80 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				CCD3ADB418AC38BE00FE8DC5 /* OpenAL.framework */,
+				CCFD653E163755D80020EFDD /* GLKit.framework */,
+				CC69FB0E16374681009585B5 /* OpenGLES.framework */,
+				08914C08142A826B00991C80 /* UIKit.framework */,
+				08914C0A142A826B00991C80 /* Foundation.framework */,
+				08914C0C142A826B00991C80 /* CoreGraphics.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		08914C0E142A826B00991C80 /* jme-ios */ = {
+			isa = PBXGroup;
+			children = (
+				08914C17142A826B00991C80 /* jmeAppDelegate.h */,
+				08914C18142A826B00991C80 /* jmeAppDelegate.m */,
+				08914C1A142A826B00991C80 /* iPhone */,
+				08914C21142A826B00991C80 /* iPad */,
+				08914C0F142A826B00991C80 /* Supporting Files */,
+			);
+			path = "jme-ios";
+			sourceTree = "<group>";
+		};
+		08914C0F142A826B00991C80 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				08914C10142A826B00991C80 /* jme-ios-Info.plist */,
+				08914C11142A826B00991C80 /* InfoPlist.strings */,
+				08914C14142A826B00991C80 /* main.m */,
+				08914C16142A826B00991C80 /* jme-ios-Prefix.pch */,
+				E9E6260F18A052130084FC12 /* logging.properties */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		08914C1A142A826B00991C80 /* iPhone */ = {
+			isa = PBXGroup;
+			children = (
+				08914C1B142A826B00991C80 /* jmeAppDelegate_iPhone.h */,
+				08914C1C142A826B00991C80 /* jmeAppDelegate_iPhone.m */,
+				08914C1E142A826B00991C80 /* MainWindow_iPhone.xib */,
+			);
+			name = iPhone;
+			sourceTree = "<group>";
+		};
+		08914C21142A826B00991C80 /* iPad */ = {
+			isa = PBXGroup;
+			children = (
+				08914C22142A826B00991C80 /* jmeAppDelegate_iPad.h */,
+				08914C23142A826B00991C80 /* jmeAppDelegate_iPad.m */,
+				08914C25142A826B00991C80 /* MainWindow_iPad.xib */,
+			);
+			name = iPad;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		08914C03142A826B00991C80 /* jme-ios */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 08914C2A142A826B00991C80 /* Build configuration list for PBXNativeTarget "jme-ios" */;
+			buildPhases = (
+				08914C00142A826B00991C80 /* Sources */,
+				08914C01142A826B00991C80 /* Frameworks */,
+				08914C02142A826B00991C80 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "jme-ios";
+			productName = hello;
+			productReference = 08914C04142A826B00991C80 /* jme-ios.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		08914BFB142A826B00991C80 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				ORGANIZATIONNAME = "ECOVATE INC, d.b.a. ReadyTalk";
+				TargetAttributes = {
+					08914C03142A826B00991C80 = {
+						DevelopmentTeam = X9TVYA7QX5;
+					};
+				};
+			};
+			buildConfigurationList = 08914BFE142A826B00991C80 /* Build configuration list for PBXProject "jme-ios" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+			);
+			mainGroup = 08914BF9142A826B00991C80;
+			productRefGroup = 08914C05142A826B00991C80 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				08914C03142A826B00991C80 /* jme-ios */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		08914C02142A826B00991C80 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				E9E6261018A052130084FC12 /* logging.properties in Resources */,
+				08914C13142A826B00991C80 /* InfoPlist.strings in Resources */,
+				08914C20142A826B00991C80 /* MainWindow_iPhone.xib in Resources */,
+				08914C27142A826B00991C80 /* MainWindow_iPad.xib in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		08914C00142A826B00991C80 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				08914C15142A826B00991C80 /* main.m in Sources */,
+				08914C19142A826B00991C80 /* jmeAppDelegate.m in Sources */,
+				08914C1D142A826B00991C80 /* jmeAppDelegate_iPhone.m in Sources */,
+				08914C24142A826B00991C80 /* jmeAppDelegate_iPad.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		08914C11142A826B00991C80 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				08914C12142A826B00991C80 /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		08914C1E142A826B00991C80 /* MainWindow_iPhone.xib */ = {
+			isa = PBXVariantGroup;
+			children = (
+				08914C1F142A826B00991C80 /* en */,
+			);
+			name = MainWindow_iPhone.xib;
+			sourceTree = "<group>";
+		};
+		08914C25142A826B00991C80 /* MainWindow_iPad.xib */ = {
+			isa = PBXVariantGroup;
+			children = (
+				08914C26142A826B00991C80 /* en */,
+			);
+			name = MainWindow_iPad.xib;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		08914C28142A826B00991C80 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = "";
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					/System/Library/Frameworks/JavaVM.framework/Headers,
+					/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Headers/,
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+				OTHER_LDFLAGS = (
+					"-filelist",
+					"../../build/ios-arm/libs.list",
+					"-filelist",
+					"../../build/ios-arm64/libs.list",
+					"-filelist",
+					"../../build/ios-i386/libs.list",
+					"-lz",
+					"-rdynamic",
+				);
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		08914C29142A826B00991C80 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_VERSION = "";
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					/System/Library/Frameworks/JavaVM.framework/Headers,
+					/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Headers/,
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+				OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+				OTHER_LDFLAGS = (
+					"-filelist",
+					"../../build/ios-arm/libs.list",
+					"-filelist",
+					"../../build/ios-arm64/libs.list",
+					"-filelist",
+					"../../build/ios-i386/libs.list",
+					"-lz",
+					"-rdynamic",
+				);
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		08914C2B142A826B00991C80 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					armv7,
+					i386,
+				);
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "jme-ios/jme-ios-Prefix.pch";
+				GCC_VERSION = "";
+				HEADER_SEARCH_PATHS = (
+					/System/Library/Frameworks/JavaVM.framework/Headers,
+					/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Headers/,
+				);
+				INFOPLIST_FILE = "jme-ios/jme-ios-Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+				PRODUCT_NAME = "jme-ios";
+				PROVISIONING_PROFILE = "";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		08914C2C142A826B00991C80 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = (
+					armv7,
+					i386,
+				);
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "jme-ios/jme-ios-Prefix.pch";
+				GCC_VERSION = "";
+				HEADER_SEARCH_PATHS = (
+					/System/Library/Frameworks/JavaVM.framework/Headers,
+					/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Headers/,
+				);
+				INFOPLIST_FILE = "jme-ios/jme-ios-Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+				PRODUCT_NAME = "jme-ios";
+				PROVISIONING_PROFILE = "";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		08914BFE142A826B00991C80 /* Build configuration list for PBXProject "jme-ios" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				08914C28142A826B00991C80 /* Debug */,
+				08914C29142A826B00991C80 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		08914C2A142A826B00991C80 /* Build configuration list for PBXNativeTarget "jme-ios" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				08914C2B142A826B00991C80 /* Debug */,
+				08914C2C142A826B00991C80 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 08914BFB142A826B00991C80 /* Project object */;
+}

+ 7 - 0
jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:jme-ios.xcodeproj">
+   </FileRef>
+</Workspace>

BIN
jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/project.xcworkspace/xcuserdata/normenhansen.xcuserdatad/UserInterfaceState.xcuserstate


+ 10 - 0
jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/project.xcworkspace/xcuserdata/normenhansen.xcuserdatad/WorkspaceSettings.xcsettings

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
+	<true/>
+	<key>SnapshotAutomaticallyBeforeSignificantChanges</key>
+	<true/>
+</dict>
+</plist>

+ 86 - 0
jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/xcuserdata/normenhansen.xcuserdatad/xcschemes/hello.xcscheme

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0450"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "08914C03142A826B00991C80"
+               BuildableName = "jme-ios.app"
+               BlueprintName = "jme-ios"
+               ReferencedContainer = "container:jme-ios.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      buildConfiguration = "Debug">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "08914C03142A826B00991C80"
+            BuildableName = "jme-ios.app"
+            BlueprintName = "jme-ios"
+            ReferencedContainer = "container:jme-ios.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+   </TestAction>
+   <LaunchAction
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      buildConfiguration = "Debug"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "08914C03142A826B00991C80"
+            BuildableName = "jme-ios.app"
+            BlueprintName = "jme-ios"
+            ReferencedContainer = "container:jme-ios.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      buildConfiguration = "Release"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "08914C03142A826B00991C80"
+            BuildableName = "jme-ios.app"
+            BlueprintName = "jme-ios"
+            ReferencedContainer = "container:jme-ios.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 22 - 0
jme3-ios/ios-data/templates/project/jme-ios.xcodeproj/xcuserdata/normenhansen.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>hello.xcscheme</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>0</integer>
+		</dict>
+	</dict>
+	<key>SuppressBuildableAutocreation</key>
+	<dict>
+		<key>08914C03142A826B00991C80</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
+	</dict>
+</dict>
+</plist>

+ 2 - 0
jme3-ios/ios-data/templates/project/jme-ios/en.lproj/InfoPlist.strings

@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+

+ 252 - 0
jme3-ios/ios-data/templates/project/jme-ios/iPad/en.lproj/MainWindow_iPad.xib

@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
+	<data>
+		<int key="IBDocument.SystemTarget">1536</int>
+		<string key="IBDocument.SystemVersion">12C60</string>
+		<string key="IBDocument.InterfaceBuilderVersion">2843</string>
+		<string key="IBDocument.AppKitVersion">1187.34</string>
+		<string key="IBDocument.HIToolboxVersion">625.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">1929</string>
+		</object>
+		<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>IBGLKView</string>
+			<string>IBProxyObject</string>
+			<string>IBUICustomObject</string>
+			<string>IBUIWindow</string>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+			<integer value="1" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="IBProxyObject" id="841351856">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBProxyObject" id="606714003">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBUIWindow" id="62075450">
+				<reference key="NSNextResponder"/>
+				<int key="NSvFlags">292</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBGLKView" id="599209716">
+						<reference key="NSNextResponder" ref="62075450"/>
+						<int key="NSvFlags">274</int>
+						<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
+						<reference key="NSSuperview" ref="62075450"/>
+						<reference key="NSWindow"/>
+						<reference key="NSNextKeyView"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">4</int>
+						<bool key="IBUIMultipleTouchEnabled">YES</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<bool key="IBGLKEnableSetNeedsDisplay">NO</bool>
+					</object>
+				</object>
+				<string key="NSFrameSize">{768, 1024}</string>
+				<reference key="NSSuperview"/>
+				<reference key="NSWindow"/>
+				<reference key="NSNextKeyView" ref="599209716"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">1</int>
+					<bytes key="NSRGB">MSAxIDEAA</bytes>
+				</object>
+				<bool key="IBUIOpaque">NO</bool>
+				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
+					<int key="IBUIStatusBarStyle">2</int>
+				</object>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+				<bool key="IBUIResizesToFullScreen">YES</bool>
+			</object>
+			<object class="IBUICustomObject" id="250404236">
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">delegate</string>
+						<reference key="source" ref="841351856"/>
+						<reference key="destination" ref="250404236"/>
+					</object>
+					<int key="connectionID">8</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">window</string>
+						<reference key="source" ref="250404236"/>
+						<reference key="destination" ref="62075450"/>
+					</object>
+					<int key="connectionID">7</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">glview</string>
+						<reference key="source" ref="250404236"/>
+						<reference key="destination" ref="599209716"/>
+					</object>
+					<int key="connectionID">16</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<object class="NSArray" key="object" id="0">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<reference key="children" ref="1000"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="841351856"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="606714003"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">2</int>
+						<reference key="object" ref="62075450"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="599209716"/>
+						</object>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">6</int>
+						<reference key="object" ref="250404236"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">12</int>
+						<reference key="object" ref="599209716"/>
+						<reference key="parent" ref="62075450"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.CustomClassName</string>
+					<string>-1.IBPluginDependency</string>
+					<string>-2.CustomClassName</string>
+					<string>-2.IBPluginDependency</string>
+					<string>12.IBPluginDependency</string>
+					<string>2.IBPluginDependency</string>
+					<string>6.CustomClassName</string>
+					<string>6.IBPluginDependency</string>
+				</object>
+				<object class="NSArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>UIApplication</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>UIResponder</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>jmeAppDelegate_iPad</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<reference key="dict.values" ref="0"/>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<reference key="dict.values" ref="0"/>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">16</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">jmeAppDelegate</string>
+					<string key="superclassName">NSObject</string>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>glview</string>
+							<string>window</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>GLKView</string>
+							<string>UIWindow</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>glview</string>
+							<string>window</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBToOneOutletInfo">
+								<string key="name">glview</string>
+								<string key="candidateClassName">GLKView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">window</string>
+								<string key="candidateClassName">UIWindow</string>
+							</object>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/jmeAppDelegate.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">jmeAppDelegate_iPad</string>
+					<string key="superclassName">jmeAppDelegate</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/jmeAppDelegate_iPad.h</string>
+					</object>
+				</object>
+			</object>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+			<integer value="3100" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">1929</string>
+	</data>
+</archive>

+ 5 - 0
jme3-ios/ios-data/templates/project/jme-ios/iPad/jmeAppDelegate_iPad.h

@@ -0,0 +1,5 @@
+#import "jmeAppDelegate.h"
+
+@interface jmeAppDelegate_iPad : jmeAppDelegate
+
+@end

+ 5 - 0
jme3-ios/ios-data/templates/project/jme-ios/iPad/jmeAppDelegate_iPad.m

@@ -0,0 +1,5 @@
+#import "jmeAppDelegate_iPad.h"
+
+@implementation jmeAppDelegate_iPad
+
+@end

+ 258 - 0
jme3-ios/ios-data/templates/project/jme-ios/iPhone/en.lproj/MainWindow_iPhone.xib

@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+	<data>
+		<int key="IBDocument.SystemTarget">1536</int>
+		<string key="IBDocument.SystemVersion">12C60</string>
+		<string key="IBDocument.InterfaceBuilderVersion">2843</string>
+		<string key="IBDocument.AppKitVersion">1187.34</string>
+		<string key="IBDocument.HIToolboxVersion">625.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">1929</string>
+		</object>
+		<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>IBGLKView</string>
+			<string>IBProxyObject</string>
+			<string>IBUICustomObject</string>
+			<string>IBUIWindow</string>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+			<integer value="1" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="IBProxyObject" id="841351856">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBProxyObject" id="450319686">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBUICustomObject" id="987256611">
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBUIWindow" id="380026005">
+				<reference key="NSNextResponder"/>
+				<int key="NSvFlags">1316</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBGLKView" id="97650301">
+						<reference key="NSNextResponder" ref="380026005"/>
+						<int key="NSvFlags">1298</int>
+						<string key="NSFrame">{{0, 20}, {320, 460}}</string>
+						<reference key="NSSuperview" ref="380026005"/>
+						<reference key="NSWindow"/>
+						<reference key="NSNextKeyView"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">4</int>
+						<bool key="IBUIMultipleTouchEnabled">YES</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<bool key="IBGLKEnableSetNeedsDisplay">NO</bool>
+					</object>
+				</object>
+				<object class="NSPSMatrix" key="NSFrameMatrix"/>
+				<string key="NSFrameSize">{320, 480}</string>
+				<reference key="NSSuperview"/>
+				<reference key="NSWindow"/>
+				<reference key="NSNextKeyView" ref="97650301"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">1</int>
+					<bytes key="NSRGB">MSAxIDEAA</bytes>
+				</object>
+				<bool key="IBUIOpaque">NO</bool>
+				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+				<bool key="IBUIResizesToFullScreen">YES</bool>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">delegate</string>
+						<reference key="source" ref="841351856"/>
+						<reference key="destination" ref="987256611"/>
+					</object>
+					<int key="connectionID">5</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">window</string>
+						<reference key="source" ref="987256611"/>
+						<reference key="destination" ref="380026005"/>
+					</object>
+					<int key="connectionID">6</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">glview</string>
+						<reference key="source" ref="987256611"/>
+						<reference key="destination" ref="97650301"/>
+					</object>
+					<int key="connectionID">10</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<object class="NSArray" key="object" id="0">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<reference key="children" ref="1000"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">2</int>
+						<reference key="object" ref="380026005"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="97650301"/>
+						</object>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="841351856"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">4</int>
+						<reference key="object" ref="987256611"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">App Delegate</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="450319686"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">9</int>
+						<reference key="object" ref="97650301"/>
+						<reference key="parent" ref="380026005"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.CustomClassName</string>
+					<string>-1.IBPluginDependency</string>
+					<string>-2.CustomClassName</string>
+					<string>-2.IBPluginDependency</string>
+					<string>2.IBAttributePlaceholdersKey</string>
+					<string>2.IBPluginDependency</string>
+					<string>4.CustomClassName</string>
+					<string>4.IBPluginDependency</string>
+					<string>9.IBPluginDependency</string>
+				</object>
+				<object class="NSArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>UIApplication</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>UIResponder</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<object class="NSMutableDictionary">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<reference key="dict.sortedKeys" ref="0"/>
+						<reference key="dict.values" ref="0"/>
+					</object>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>jmeAppDelegate_iPhone</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<reference key="dict.values" ref="0"/>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<reference key="dict.values" ref="0"/>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">10</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">jmeAppDelegate</string>
+					<string key="superclassName">NSObject</string>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>glview</string>
+							<string>window</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>GLKView</string>
+							<string>UIWindow</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>glview</string>
+							<string>window</string>
+						</object>
+						<object class="NSArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBToOneOutletInfo">
+								<string key="name">glview</string>
+								<string key="candidateClassName">GLKView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">window</string>
+								<string key="candidateClassName">UIWindow</string>
+							</object>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/jmeAppDelegate.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">jmeAppDelegate_iPhone</string>
+					<string key="superclassName">jmeAppDelegate</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/jmeAppDelegate_iPhone.h</string>
+					</object>
+				</object>
+			</object>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+			<integer value="3100" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">1929</string>
+	</data>
+</archive>

+ 5 - 0
jme3-ios/ios-data/templates/project/jme-ios/iPhone/jmeAppDelegate_iPhone.h

@@ -0,0 +1,5 @@
+#import "jmeAppDelegate.h"
+
+@interface jmeAppDelegate_iPhone : jmeAppDelegate
+
+@end

+ 5 - 0
jme3-ios/ios-data/templates/project/jme-ios/iPhone/jmeAppDelegate_iPhone.m

@@ -0,0 +1,5 @@
+#import "jmeAppDelegate_iPhone.h"
+
+@implementation jmeAppDelegate_iPhone
+
+@end

+ 47 - 0
jme3-ios/ios-data/templates/project/jme-ios/jme-ios-Info.plist

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleDisplayName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>CFBundleIdentifier</key>
+	<string>com.jmonkeyengine.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>NSMainNibFile</key>
+	<string>MainWindow_iPhone</string>
+	<key>NSMainNibFile~ipad</key>
+	<string>MainWindow_iPad</string>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+</dict>
+</plist>

+ 14 - 0
jme3-ios/ios-data/templates/project/jme-ios/jme-ios-Prefix.pch

@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'hello' target in the 'hello' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_3_0
+#warning "This project uses features only available in iPhone SDK 3.0 and later."
+#endif
+
+#ifdef __OBJC__
+    #import <UIKit/UIKit.h>
+    #import <Foundation/Foundation.h>
+#endif

+ 26 - 0
jme3-ios/ios-data/templates/project/jme-ios/jmeAppDelegate.h

@@ -0,0 +1,26 @@
+#import <UIKit/UIKit.h>
+#import <OpenGLES/ES2/gl.h>
+#import <GLKit/GLKit.h>
+#define __LP64__ 1
+#include <jni.h>
+
+@interface jmeAppDelegate : UIResponder <UIApplicationDelegate, GLKViewDelegate, GLKViewControllerDelegate>
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+@property (nonatomic, retain) IBOutlet GLKView *glview;
+@property (nonatomic, strong) GLKViewController *glviewController;
+@property (nonatomic, retain) EAGLContext *ctx;
+@property JavaVM* vm;
+@property jobject app;
+@property jobject harness;
+@property jmethodID pauseMethod;
+@property jmethodID reactivateMethod;
+@property jmethodID closeMethod;
+@property jmethodID updateMethod;
+@property jmethodID drawMethod;
+@property jmethodID reshapeMethod;
+@property jmethodID injectTouchBegin;
+@property jmethodID injectTouchMove;
+@property jmethodID injectTouchEnd;
+
+@end

+ 319 - 0
jme3-ios/ios-data/templates/project/jme-ios/jmeAppDelegate.m

@@ -0,0 +1,319 @@
+#include <stdint.h>
+#import <CoreGraphics/CoreGraphics.h>
+#import "jmeAppDelegate.h"
+
+static JNIEnv*
+getEnv(JavaVM* vm)
+{
+    void* env;
+    if ((*vm)->GetEnv(vm, &env, JNI_VERSION_1_4) == JNI_OK) {
+        return (JNIEnv*) env;
+    } else {
+        return 0;
+    }
+}
+
+@implementation jmeAppDelegate
+
+@synthesize window = _window;
+@synthesize vm = _vm;
+@synthesize app = _app;
+@synthesize harness = _harness;
+@synthesize pauseMethod = _pauseMethod;
+@synthesize reactivateMethod = _reactivateMethod;
+@synthesize closeMethod = _closeMethod;
+@synthesize updateMethod = _updateMethod;
+@synthesize drawMethod = _drawMethod;
+@synthesize reshapeMethod = _reshapeMethod;
+@synthesize injectTouchBegin = _injectTouchBegin;
+@synthesize injectTouchMove = _injectTouchMove;
+@synthesize injectTouchEnd = _injectTouchEnd;
+@synthesize ctx = _ctx;
+@synthesize glview = _glview;
+@synthesize glviewController = _glviewController;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+    /**
+     * GLES Context initialization
+     **/
+    _ctx = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
+    _glview.context = _ctx;
+    _glview.drawableDepthFormat = GLKViewDrawableDepthFormat24;
+    _glview.delegate = self;
+    
+    /**
+     * GLES View Controller initialization
+     **/
+    _glviewController = [[GLKViewController alloc] initWithNibName:nil bundle:nil]; // 1
+    _glviewController.view = _glview; // 2
+    _glviewController.delegate = self; // 3
+    _glviewController.preferredFramesPerSecond = 30; // 4
+    _glviewController.paused = NO;
+    _window.rootViewController = _glviewController; // 5
+
+    /**
+     * Java initilization.
+     * Note that though it looks like a JVM is created, in fact only the JNI api is being used here,
+     * the whole application and java classpath has been precompiled.
+     **/
+    JavaVMInitArgs vmArgs;
+    vmArgs.version = JNI_VERSION_1_4;
+    vmArgs.nOptions = 5;
+    vmArgs.ignoreUnrecognized = JNI_TRUE;
+    
+    JavaVMOption options[vmArgs.nOptions];
+    vmArgs.options = options;
+    
+    options[0].optionString = (char*) "-Davian.bootimage=bootimageBin";
+    options[1].optionString = (char*) "-Davian.codeimage=codeimageBin";
+    options[2].optionString = (char*) "-Dsun.reflect.inflationThreshold=2147483647";
+    options[3].optionString = (char*) "-Xbootclasspath:[resourcesJar]";
+
+    // Enable logging
+    NSString *path = [[NSBundle mainBundle] pathForResource:@"logging" ofType:@"properties"];
+    NSString *log = [NSString stringWithFormat:@"-Djava.util.logging.config.file=%@", path];
+    options[4].optionString = (char*) [log cStringUsingEncoding:NSASCIIStringEncoding];
+    //
+    
+    JavaVM* vm;
+    void* env;
+    JNI_CreateJavaVM(&vm, &env, &vmArgs);
+    JNIEnv* e = (JNIEnv*) env;
+    if ((*e)->ExceptionCheck(e)) {
+        (*e)->ExceptionDescribe(e);
+        (*e)->ExceptionClear(e);
+        return NO;
+    }
+    
+    /**
+     * iOS Harness initilization.
+     * The harness is being called after creating the application.
+     **/
+    jclass harnessClass = (*e)->FindClass(e, "JmeAppHarness");
+    if (! (*e)->ExceptionCheck(e)) {
+        jmethodID harnessConstructor = (*e)->GetMethodID(e, harnessClass, "<init>", "(J)V");
+        if (! (*e)->ExceptionCheck(e)) {
+            jobject harnessObject = (*e)->NewObject(e, harnessClass, harnessConstructor, (jlong)self);
+            if (! (*e)->ExceptionCheck(e)) {
+                self.harness = harnessObject;
+                (*e)->NewGlobalRef(e, harnessObject);
+                self.pauseMethod = (*e)->GetMethodID(e, harnessClass, "appPaused", "()V");
+                (*e)->ExceptionCheck(e);
+                self.reactivateMethod = (*e)->GetMethodID(e, harnessClass, "appReactivated", "()V");
+                (*e)->ExceptionCheck(e);
+                self.closeMethod = (*e)->GetMethodID(e, harnessClass, "appClosed", "()V");
+                (*e)->ExceptionCheck(e);
+                self.updateMethod = (*e)->GetMethodID(e, harnessClass, "appUpdate", "()V");
+                (*e)->ExceptionCheck(e);
+                self.drawMethod = (*e)->GetMethodID(e, harnessClass, "appDraw", "()V");
+                (*e)->ExceptionCheck(e);
+                self.reshapeMethod = (*e)->GetMethodID(e, harnessClass, "appReshape", "(II)V");
+                (*e)->ExceptionCheck(e);
+                self.injectTouchBegin = (*e)->GetMethodID(e, harnessClass, "injectTouchBegin", "(IJFF)V");
+                (*e)->ExceptionCheck(e);
+                self.injectTouchMove = (*e)->GetMethodID(e, harnessClass, "injectTouchMove", "(IJFF)V");
+                (*e)->ExceptionCheck(e);
+                self.injectTouchEnd = (*e)->GetMethodID(e, harnessClass, "injectTouchEnd", "(IJFF)V");
+                (*e)->ExceptionCheck(e);
+            }else{
+                NSLog(@"Could not create new iOS Harness object");
+                (*e)->ExceptionDescribe(e);
+                (*e)->ExceptionClear(e);
+                return NO;
+            }
+        }else{
+            NSLog(@"Could not find iOS Harness constructor");
+            (*e)->ExceptionDescribe(e);
+            (*e)->ExceptionClear(e);
+            return NO;
+        }
+    }else{
+        (*e)->ExceptionDescribe(e);
+        (*e)->ExceptionClear(e);
+        NSLog(@"Could not find iOS Harness class");
+        return NO;
+    }
+
+    self.vm = vm;
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIDeviceOrientationDidChangeNotification object:nil];
+    
+    //return (*e)->ExceptionCheck(e) ? NO : YES;
+    return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+    /*
+     Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+     Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+     */
+    JNIEnv* e = getEnv(self.vm);
+    if (e) {
+        (*e)->CallVoidMethod(e, self.harness, self.pauseMethod);
+    }
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+    /*
+     Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+     If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+     */
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+    /*
+     Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+     */
+    JNIEnv* e = getEnv(self.vm);
+    if (e) {
+        (*e)->CallVoidMethod(e, self.harness, self.reactivateMethod);
+    }
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+    /*
+     Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+     */
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+    JNIEnv* e = getEnv(self.vm);
+    if (e) {
+        (*e)->CallVoidMethod(e, self.harness, self.closeMethod);
+    }
+}
+
+- (void)dealloc
+{
+    JNIEnv* e = getEnv(self.vm);
+    if (e) {
+        if(self.app!=nil){
+            (*e)->DeleteGlobalRef(e, self.app);
+        }
+        if(self.harness!=nil){
+            (*e)->DeleteGlobalRef(e, self.harness);
+        }
+    }
+    (*self.vm)->DestroyJavaVM(self.vm);
+    [_window release];
+    _glview.context = nil;
+    [_glview release];
+    [_ctx release];
+    [super dealloc];
+}
+
+- (BOOL)shouldAutorotate
+{
+    //returns true if want to allow orientation change
+    return TRUE;
+}
+
+- (NSUInteger)supportedInterfaceOrientations
+{
+    //decide number of origination tob supported by Viewcontroller.
+    return UIInterfaceOrientationMaskAll;
+}
+
+- (void)didRotate:(NSNotification *)notification
+{
+    CGRect originalFrame = [[UIScreen mainScreen] bounds];
+    CGRect frame = [self.glview convertRect:originalFrame fromView:nil];
+    JNIEnv* e = getEnv(self.vm);
+    if (e) {
+        float scale = _glview.contentScaleFactor;
+        (*e)->CallVoidMethod(e, self.harness, self.reshapeMethod, (int)(frame.size.width * scale), (int)(frame.size.height * scale));
+        if ((*e)->ExceptionCheck(e)) {
+            NSLog(@"Could not invoke iOS Harness reshape");
+            (*e)->ExceptionDescribe(e);
+            (*e)->ExceptionClear(e);
+        }
+    }
+}
+
+#pragma mark - GLKViewDelegate
+
+- (void)glkView:(GLKView *)view drawInRect:(CGRect)rect {
+    JNIEnv* e = getEnv(self.vm);
+    if (e) {
+        (*e)->CallVoidMethod(e, self.harness, self.drawMethod);
+        if ((*e)->ExceptionCheck(e)) {
+            NSLog(@"Could not invoke iOS Harness update");
+            (*e)->ExceptionDescribe(e);
+            (*e)->ExceptionClear(e);
+        }
+    }
+}
+
+#pragma mark - GLKViewControllerDelegate
+
+- (void)glkViewControllerUpdate:(GLKViewController *)controller {
+    JNIEnv* e = getEnv(self.vm);
+    if (e) {
+        (*e)->CallVoidMethod(e, self.harness, self.updateMethod);
+        if ((*e)->ExceptionCheck(e)) {
+            NSLog(@"Could not invoke iOS Harness update");
+            (*e)->ExceptionDescribe(e);
+            (*e)->ExceptionClear(e);
+        }
+    }
+
+}
+
+#pragma mark - UIResponder
+
+- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
+    NSLog(@"touchesBegan");
+    JNIEnv* e = getEnv(self.vm);
+    if (e) {
+    	UITouch *touch = [touches anyObject];
+    	CGPoint position = [touch locationInView: nil];
+        (*e)->CallVoidMethod(e, self.harness, self.injectTouchBegin, 0, touch.timestamp, position.x, position.y);
+        if ((*e)->ExceptionCheck(e)) {
+            NSLog(@"Could not invoke iOS Harness injectTouchBegin");
+            (*e)->ExceptionDescribe(e);
+            (*e)->ExceptionClear(e);
+        }
+    }
+}
+
+- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
+    NSLog(@"touchesMoved");
+    JNIEnv* e = getEnv(self.vm);
+    if (e) {
+    	UITouch *touch = [touches anyObject];
+    	CGPoint position = [touch locationInView: nil];
+        (*e)->CallVoidMethod(e, self.harness, self.injectTouchMove, 0, touch.timestamp, position.x, position.y);
+        if ((*e)->ExceptionCheck(e)) {
+            NSLog(@"Could not invoke iOS Harness injectTouchMove");
+            (*e)->ExceptionDescribe(e);
+            (*e)->ExceptionClear(e);
+        }
+    }
+}
+
+- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
+    NSLog(@"touchesEnded");
+    JNIEnv* e = getEnv(self.vm);
+    if (e) {
+    	UITouch *touch = [touches anyObject];
+    	CGPoint position = [touch locationInView: nil];
+        (*e)->CallVoidMethod(e, self.harness, self.injectTouchEnd, 0, touch.timestamp, position.x, position.y);
+        if ((*e)->ExceptionCheck(e)) {
+            NSLog(@"Could not invoke iOS Harness injectTouchEnd");
+            (*e)->ExceptionDescribe(e);
+            (*e)->ExceptionClear(e);
+        }
+    }
+}
+
+- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
+    NSLog(@"touchesCancelled");
+}
+
+@end

+ 1 - 0
jme3-ios/ios-data/templates/project/jme-ios/logging.properties

@@ -0,0 +1 @@
+.level = FINEST

+ 9 - 0
jme3-ios/ios-data/templates/project/jme-ios/main.m

@@ -0,0 +1,9 @@
+#import <UIKit/UIKit.h>
+
+int main(int argc, char *argv[])
+{
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    int retVal = UIApplicationMain(argc, argv, nil, nil);
+    [pool release];
+    return retVal;
+}

+ 122 - 0
jme3-ios/ios-data/templates/src/JmeAppHarness.java

@@ -0,0 +1,122 @@
+import com.jme3.system.AppSettings;
+import com.jme3.system.ios.IosHarness;
+import com.jme3.renderer.ios.IGLESShaderRenderer;
+import com.jme3.input.ios.IosInputHandler;
+import com.jme3.renderer.*;
+import com.jme3.system.JmeContext;
+import com.jme3.system.AppSettings;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * You can extend this class to perform iOS-only operations from java,
+ * native methods can reside either in .c/.m files in this directory
+ * or in the XCode project itself.
+ * @author normenhansen
+ */
+public class JmeAppHarness extends IosHarness{
+
+    private static final Logger logger = Logger.getLogger(JmeAppHarness.class.getName());
+	protected IGLESShaderRenderer renderer;
+	protected IosInputHandler input;
+	protected boolean autoFlush = true;
+
+
+    /**
+     * An instance of this object is created when your application
+     * has started on the iOS side.
+     * You can e.g. attach special AppStates or do similar things here. You can
+     * access classes from this source directory as well as your main projects
+     * sources and classpath.
+     */
+    public JmeAppHarness(long id) {
+        super(id);
+        app = new mygame.Main();
+        AppSettings settings = new AppSettings(true);
+        this.app.setSettings(settings);
+        app.start();
+        logger.log(Level.FINE, "JmeAppHarness constructor");
+        app.gainFocus();
+    }
+
+    @Override
+    public void appPaused() {
+        logger.log(Level.FINE, "JmeAppHarness appPaused");
+    }
+
+    @Override
+    public void appReactivated() {
+        logger.log(Level.FINE, "JmeAppHarness appReactivated");
+    }
+
+    @Override
+    public void appClosed() {
+        logger.log(Level.FINE, "JmeAppHarness appClosed");
+        app.stop();
+    }
+
+    @Override
+    public void appUpdate() {
+        logger.log(Level.FINE, "JmeAppHarness appUpdate");
+       //app.update();
+    }
+
+    @Override
+    public void appDraw() {
+        logger.log(Level.FINE, "JmeAppHarness appDraw");
+		if (renderer == null) {
+			JmeContext iosContext = app.getContext();
+			renderer = (IGLESShaderRenderer)iosContext.getRenderer();
+			renderer.initialize();
+			input = (IosInputHandler)iosContext.getTouchInput();
+			input.initialize();
+		} else {
+			app.update();
+    	    if (autoFlush) {
+        	    renderer.onFrame();
+        	}
+        }
+    }
+    
+    @Override
+    public void appReshape(int width, int height) {
+        logger.log(Level.FINE, "JmeAppHarness reshape");
+        AppSettings settings = app.getContext().getSettings();
+        settings.setResolution(width, height);
+        if (renderer != null) {
+    		app.reshape(width, height);
+    	}
+    	if (input != null) {
+    		input.loadSettings(settings);
+    	}
+    }
+    
+    public void injectTouchBegin(int pointerId, long time, float x, float y) {
+    	if (input != null) {
+        	logger.log(Level.FINE, "JmeAppHarness injectTouchBegin");
+    		input.injectTouchDown(pointerId, time, x, y);
+    	}
+    }
+    
+    public void injectTouchMove(int pointerId, long time, float x, float y) {
+    	if (input != null) {
+        	logger.log(Level.FINE, "JmeAppHarness injectTouchMove");
+    		input.injectTouchMove(pointerId, time, x, y);
+    	}
+    }
+    
+    public void injectTouchEnd(int pointerId, long time, float x, float y) {
+    	if (input != null) {
+        	logger.log(Level.FINE, "JmeAppHarness injectTouchEnd");
+    		input.injectTouchUp(pointerId, time, x, y);
+    	}
+    }
+    
+    /**
+     * Example of a native method calling iOS code.
+     * See the native code in IosHarness.m
+     * @param text The message to display
+     */
+    public native void showDialog(String text);
+
+}

+ 60 - 0
jme3-ios/ios-data/templates/src/JmeAppHarness.m

@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2009-2013 jMonkeyEngine
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ *   may be used to endorse or promote products derived from this software
+ *   without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <jni.h>
+#import <UIKit/UIKit.h>
+
+/**
+ * Author: Normen Hansen
+ */
+
+#ifndef JNIEXPORT
+#define JNIEXPORT __attribute__ ((visibility("default"))) \
+  __attribute__ ((used))
+#endif
+
+#ifndef _Included_JmeAppHarness
+#define _Included_JmeAppHarness
+#endif
+
+JNIEXPORT void JNICALL
+Java_JmeAppHarness_showDialog(JNIEnv* e, jobject c, jstring text) {
+    const char* chars = (*e)->GetStringUTFChars(e, text, 0);
+    NSString* string = [[NSString alloc] initWithUTF8String : chars];
+    (*e)->ReleaseStringUTFChars(e, text, chars);
+    UIAlertView *alert = [[UIAlertView alloc] initWithTitle : @"Message"
+            message : string
+            delegate : nil
+            cancelButtonTitle : @"OK"
+            otherButtonTitles : nil];
+    [alert show];
+    [alert release];
+}

+ 1944 - 0
jme3-ios/ios-data/templates/src/JmeIosGLES.m

@@ -0,0 +1,1944 @@
+#import <stdlib.h>
+#define __LP64__ 1
+#import <jni.h>
+#import <OpenGLES/ES2/gl.h>
+#import <OpenGLES/ES2/glext.h>
+
+/**
+ * Author: Kostyantyn Hushchyn
+ */
+
+#ifndef JNIEXPORT
+#define JNIEXPORT __attribute__ ((visibility("default"))) \
+  __attribute__ ((used))
+#endif
+
+#ifndef _Included_JmeIosGLES
+#define _Included_JmeIosGLES
+#endif
+
+#define glBindVertexArray glBindVertexArrayOES
+
+static int initialized = 0;
+
+static jclass bufferClass = (jclass)0;
+static jclass byteBufferClass = (jclass)0;
+static jclass shortBufferClass = (jclass)0;
+static jclass intBufferClass = (jclass)0;
+static jclass floatBufferClass = (jclass)0;
+static jfieldID positionID;
+static jfieldID limitID;
+
+
+static void
+nativeClassInit(JNIEnv *e);
+
+static int
+allowIndirectBuffers(JNIEnv *e);
+
+static void *
+getDirectBufferPointer(JNIEnv *e, jobject buffer);
+
+static void *
+getPointer(JNIEnv *e, jobject buffer, jarray *array, jint *remaining, jint *offset);
+
+static void
+releasePointer(JNIEnv *e, jarray array, void *data, jboolean commit);
+
+static void
+jniThrowException(JNIEnv *e, const char* type, const char* message);
+
+static jint
+getBufferElementSize(JNIEnv *e, jobject buffer);
+
+static int getNeededCount(GLint pname);
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glActiveTexture(JNIEnv* e, jobject c, jint texture) {
+    glActiveTexture(
+        (GLenum)texture
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glAttachShader(JNIEnv* e, jobject c, jint program, jint shader) {
+    glAttachShader(
+        (GLuint)program,
+        (GLuint)shader
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glBindBuffer(JNIEnv* e, jobject c, jint target, jint buffer) {
+    glBindBuffer(
+        (GLenum)target,
+        (GLuint)buffer
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glBindFramebuffer(JNIEnv* e, jobject c, jint target, jint framebuffer) {
+    glBindFramebuffer(
+        (GLenum)target,
+        (GLuint)framebuffer
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glBindRenderbuffer(JNIEnv* e, jobject c, jint target, jint renderbuffer) {
+    glBindRenderbuffer(
+        (GLenum)target,
+        (GLuint)renderbuffer
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glBindTexture(JNIEnv* e, jobject c, jint target, jint texture) {
+    glBindTexture(
+        (GLenum)target,
+        (GLuint)texture
+    );
+}
+
+ // TODO: Investigate this
+ /*
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glBindVertexArray(JNIEnv* e, jobject c, jint array) {
+	glBindVertexArray(array);
+}
+*/
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glBlendFunc(JNIEnv* e, jobject c, jint sfactor, jint dfactor) {
+    glBlendFunc(
+        (GLenum)sfactor,
+        (GLenum)dfactor
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glBufferData(JNIEnv* e, jobject c, jint target, jint size, jobject data_buf, jint usage) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLvoid *data = (GLvoid *) 0;
+
+    if (data_buf) {
+        data = (GLvoid *)getPointer(e, data_buf, &_array, &_remaining, &_bufferOffset);
+        if (_remaining < size) {
+            _exception = 1;
+            _exceptionType = "java/lang/IllegalArgumentException";
+            _exceptionMessage = "remaining() < size < needed";
+            goto exit;
+        }
+    }
+    if (data_buf && data == NULL) {
+        char * _dataBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        data = (GLvoid *) (_dataBase + _bufferOffset);
+    }
+    glBufferData(
+        (GLenum)target,
+        (GLsizeiptr)size,
+        (GLvoid *)data,
+        (GLenum)usage
+    );
+
+exit:
+    if (_array) {
+        releasePointer(e, _array, data, JNI_FALSE);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glBufferData2(JNIEnv* e, jobject c, jint target, jint size, jbyteArray data, jint offset, jint usage) {
+	jbyte *dataNative = (*e)->GetByteArrayElements(e, data, NULL);
+	
+    glBufferData(
+        (GLenum)target,
+        (GLsizeiptr)size,
+        (GLvoid *)dataNative,
+        (GLenum)(usage + offset)
+    );
+	
+	(*e)->ReleaseByteArrayElements(e, data, dataNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glBufferSubData(JNIEnv* e, jobject c, jint target, jint offset, jint size, jobject data_buf) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLvoid *data = (GLvoid *) 0;
+
+    data = (GLvoid *)getPointer(e, data_buf, &_array, &_remaining, &_bufferOffset);
+    if (_remaining < size) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "remaining() < size < needed";
+        goto exit;
+    }
+    if (data == NULL) {
+        char * _dataBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        data = (GLvoid *) (_dataBase + _bufferOffset);
+    }
+    glBufferSubData(
+        (GLenum)target,
+        (GLintptr)offset,
+        (GLsizeiptr)size,
+        (GLvoid *)data
+    );
+
+exit:
+    if (_array) {
+        releasePointer(e, _array, data, JNI_FALSE);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glBufferSubData2(JNIEnv* e, jobject c, jint target, jint offset, jint size, jbyteArray data, jint dataoffset) {
+	jbyte *dataNative = (*e)->GetByteArrayElements(e, data, NULL);
+	
+    glBufferSubData(
+        (GLenum)target,
+        (GLintptr)offset,
+        (GLsizeiptr)size,
+        (GLvoid *)(dataNative + dataoffset)
+    );
+	
+	(*e)->ReleaseByteArrayElements(e, data, dataNative, 0);
+}
+
+JNIEXPORT jint JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glCheckFramebufferStatus(JNIEnv* e, jobject c, jint target) {
+    GLenum _returnValue;
+    _returnValue = glCheckFramebufferStatus(
+        (GLenum)target
+    );
+    return (jint)_returnValue;
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glClear(JNIEnv* e, jobject c, jint mask) {
+    glClear(
+        (GLbitfield)mask
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glClearColor(JNIEnv* e, jobject c, jfloat red, jfloat green, jfloat blue, jfloat alpha) {
+    glClearColor(
+        (GLclampf)red,
+        (GLclampf)green,
+        (GLclampf)blue,
+        (GLclampf)alpha
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glColorMask(JNIEnv* e, jobject c, jboolean red, jboolean green, jboolean blue, jboolean alpha) {
+    glColorMask(
+        (GLboolean)red,
+        (GLboolean)green,
+        (GLboolean)blue,
+        (GLboolean)alpha
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glCompileShader(JNIEnv* e, jobject c, jint shader) {
+    glCompileShader(
+        (GLuint)shader
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glCompressedTexImage2D(JNIEnv* e, jobject c, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject pixels_buf) {
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLvoid *pixels = (GLvoid *) 0;
+
+    if (pixels_buf) {
+        pixels = (GLvoid *)getPointer(e, pixels_buf, &_array, &_remaining, &_bufferOffset);
+    }
+    if (pixels_buf && pixels == NULL) {
+        char * _pixelsBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
+    }
+    glCompressedTexImage2D(
+        (GLenum)target,
+        (GLint)level,
+        (GLenum)internalformat,
+        (GLsizei)width,
+        (GLsizei)height,
+        (GLint)border,
+        (GLsizei)imageSize,
+        (GLvoid *)pixels
+    );
+    if (_array) {
+        releasePointer(e, _array, pixels, JNI_FALSE);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glCompressedTexSubImage2D(JNIEnv* e, jobject c, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject pixels_buf) {
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLvoid *pixels = (GLvoid *) 0;
+
+    if (pixels_buf) {
+        pixels = (GLvoid *)getPointer(e, pixels_buf, &_array, &_remaining, &_bufferOffset);
+    }
+    if (pixels_buf && pixels == NULL) {
+        char * _pixelsBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
+    }
+    glCompressedTexSubImage2D(
+        (GLenum)target,
+        (GLint)level,
+        (GLint)xoffset,
+        (GLint)yoffset,
+        (GLsizei)width,
+        (GLsizei)height,
+        (GLenum)format,
+        (GLsizei)imageSize,
+        (GLvoid *)pixels
+    );
+    if (_array) {
+        releasePointer(e, _array, pixels, JNI_FALSE);
+    }
+}
+
+JNIEXPORT jint JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glCreateProgram(JNIEnv* e, jobject c) {
+    GLuint _returnValue;
+    _returnValue = glCreateProgram();
+    return (jint)_returnValue;
+}
+
+JNIEXPORT jint JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glCreateShader(JNIEnv* e, jobject c, jint shaderType) {
+    GLuint _returnValue;
+    _returnValue = glCreateShader(
+        (GLenum)shaderType
+    );
+    return (jint)_returnValue;
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glCullFace(JNIEnv* e, jobject c, jint mode) {
+    glCullFace(
+        (GLenum)mode
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDeleteBuffers(JNIEnv* e, jobject c, jint n, jintArray buffers, jint offset) {
+	jint *buffersNative = (*e)->GetIntArrayElements(e, buffers, NULL);
+	
+    glDeleteBuffers(
+        (GLsizei)n,
+        (GLuint *)buffersNative
+    );
+	
+	(*e)->ReleaseIntArrayElements(e, buffers, buffersNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDeleteFramebuffers(JNIEnv* e, jobject c, jint n, jintArray framebuffers, jint offset) {
+	jint *buffersNative = (*e)->GetIntArrayElements(e, framebuffers, NULL);
+	
+    glDeleteFramebuffers(
+        (GLsizei)n,
+        (GLuint *)buffersNative
+    );
+	
+	(*e)->ReleaseIntArrayElements(e, framebuffers, buffersNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDeleteProgram(JNIEnv* e, jobject c, jint program) {
+    glDeleteProgram(
+        (GLuint)program
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDeleteRenderbuffers(JNIEnv* e, jobject c, jint n, jintArray renderbuffers, jint offset) {
+	jint *buffersNative = (*e)->GetIntArrayElements(e, renderbuffers, NULL);
+	
+    glDeleteRenderbuffers(
+        (GLsizei)n,
+        (GLuint *)buffersNative
+    );
+	
+	(*e)->ReleaseIntArrayElements(e, renderbuffers, buffersNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDeleteShader(JNIEnv* e, jobject c, jint shader) {
+    glDeleteShader(
+        (GLuint)shader
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDeleteTextures(JNIEnv* e, jobject c, jint n, jintArray textures_ref, jint offset) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    GLuint *textures_base = (GLuint *) 0;
+    jint _remaining;
+    GLuint *textures = (GLuint *) 0;
+
+    if (!textures_ref) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "textures == null";
+        goto exit;
+    }
+    if (offset < 0) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "offset < 0";
+        goto exit;
+    }
+    _remaining = (*e)->GetArrayLength(e, textures_ref) - offset;
+    if (_remaining < n) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "length - offset < n < needed";
+        goto exit;
+    }
+    textures_base = (GLuint *)
+        (*e)->GetPrimitiveArrayCritical(e, textures_ref, (jboolean *)0);
+    textures = textures_base + offset;
+
+    glDeleteTextures(
+        (GLsizei)n,
+        (GLuint *)textures
+    );
+
+exit:
+    if (textures_base) {
+        (*e)->ReleasePrimitiveArrayCritical(e, textures_ref, textures_base,
+            JNI_ABORT);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDepthFunc(JNIEnv* e, jobject c, jint func) {
+    glDepthFunc(
+        (GLenum)func
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDepthMask(JNIEnv* e, jobject c, jboolean flag) {
+    glDepthMask(
+        (GLboolean)flag
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDepthRangef(JNIEnv* e, jobject c, jfloat zNear, jfloat zFar) {
+    glDepthRangef(
+        (GLclampf)zNear,
+        (GLclampf)zFar
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDetachShader(JNIEnv* e, jobject c, jint program, jint shader) {
+    glDetachShader(
+        (GLuint)program,
+        (GLuint)shader
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDisable(JNIEnv* e, jobject c, jint cap) {
+    glDisable(
+        (GLenum)cap
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDisableVertexAttribArray(JNIEnv* e, jobject c, jint index) {
+    glDisableVertexAttribArray(
+        (GLuint)index
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDrawArrays(JNIEnv* e, jobject c, jint mode, jint first, jint count) {
+    glDrawArrays(
+        (GLenum)mode,
+        (GLint)first,
+        (GLsizei)count
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDrawElements(JNIEnv* e, jobject c, jint mode, jint count, jint type, jobject indices_buf) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLvoid *indices = (GLvoid *) 0;
+
+    indices = (GLvoid *)getPointer(e, indices_buf, &_array, &_remaining, &_bufferOffset);
+    if (_remaining < count) {
+        _exception = 1;
+        _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
+        _exceptionMessage = "remaining() < count < needed";
+        goto exit;
+    }
+    if (indices == NULL) {
+        char * _indicesBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        indices = (GLvoid *) (_indicesBase + _bufferOffset);
+    }
+    glDrawElements(
+        (GLenum)mode,
+        (GLsizei)count,
+        (GLenum)type,
+        (GLvoid *)indices
+    );
+
+exit:
+    if (_array) {
+        releasePointer(e, _array, indices, JNI_FALSE);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDrawElements2(JNIEnv* e, jobject c, jint mode, jint count, jint type, jbyteArray indices, jint offset) {
+	jbyte *indicesNative = (*e)->GetByteArrayElements(e, indices, NULL);
+	
+    glDrawElements(
+        (GLenum)mode,
+        (GLsizei)count,
+        (GLenum)type,
+        (GLvoid *)(indicesNative + offset)
+    );
+	
+	(*e)->ReleaseByteArrayElements(e, indices, indicesNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glDrawElementsIndex(JNIEnv* e, jobject c, jint mode, jint count, jint type, jint offset) {
+    glDrawElements(
+        (GLenum)mode,
+        (GLsizei)count,
+        (GLenum)type,
+        (GLvoid *)offset
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glEnable(JNIEnv* e, jobject c, jint cap) {
+    glEnable(
+        (GLenum)cap
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glEnableVertexAttribArray(JNIEnv* e, jobject c, jint index) {
+    glEnableVertexAttribArray(
+        (GLuint)index
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glFramebufferRenderbuffer(JNIEnv* e, jobject c, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
+    glFramebufferRenderbuffer(
+        (GLenum)target,
+        (GLenum)attachment,
+        (GLenum)renderbuffertarget,
+        (GLuint)renderbuffer
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glFramebufferTexture2D(JNIEnv* e, jobject c, jint target, jint attachment, jint textarget, jint texture, jint level) {
+    glFramebufferTexture2D(
+        (GLenum)target,
+        (GLenum)attachment,
+        (GLenum)textarget,
+        (GLuint)texture,
+        (GLint)level
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGenBuffers(JNIEnv* e, jobject c, jint n, jintArray buffers_ref, jint offset) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    GLuint *buffers_base = (GLuint *) 0;
+    jint _remaining;
+    GLuint *buffers = (GLuint *) 0;
+
+    if (!buffers_ref) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "buffers == null";
+        goto exit;
+    }
+    if (offset < 0) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "offset < 0";
+        goto exit;
+    }
+    _remaining = (*e)->GetArrayLength(e, buffers_ref) - offset;
+    if (_remaining < n) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "length - offset < n < needed";
+        goto exit;
+    }
+    buffers_base = (GLuint *)
+        (*e)->GetPrimitiveArrayCritical(e, buffers_ref, (jboolean *)0);
+    buffers = buffers_base + offset;
+
+    glGenBuffers(
+        (GLsizei)n,
+        (GLuint *)buffers
+    );
+
+exit:
+    if (buffers_base) {
+        (*e)->ReleasePrimitiveArrayCritical(e, buffers_ref, buffers_base,
+            _exception ? JNI_ABORT: 0);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGenFramebuffers(JNIEnv* e, jobject c, jint n, jintArray framebuffers_ref, jint offset) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    GLuint *buffers_base = (GLuint *) 0;
+    jint _remaining;
+    GLuint *buffers = (GLuint *) 0;
+
+    if (!framebuffers_ref) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "buffers == null";
+        goto exit;
+    }
+    if (offset < 0) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "offset < 0";
+        goto exit;
+    }
+    _remaining = (*e)->GetArrayLength(e, framebuffers_ref) - offset;
+    if (_remaining < n) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "length - offset < n < needed";
+        goto exit;
+    }
+    buffers_base = (GLuint *)
+        (*e)->GetPrimitiveArrayCritical(e, framebuffers_ref, (jboolean *)0);
+    buffers = buffers_base + offset;
+
+    glGenFramebuffers(
+        (GLsizei)n,
+        (GLuint *)buffers
+    );
+
+exit:
+    if (buffers_base) {
+        (*e)->ReleasePrimitiveArrayCritical(e, framebuffers_ref, buffers_base,
+            _exception ? JNI_ABORT: 0);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGenRenderbuffers(JNIEnv* e, jobject c, jint n, jintArray renderbuffers_ref, jint offset) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    GLuint *buffers_base = (GLuint *) 0;
+    jint _remaining;
+    GLuint *buffers = (GLuint *) 0;
+
+    if (!renderbuffers_ref) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "buffers == null";
+        goto exit;
+    }
+    if (offset < 0) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "offset < 0";
+        goto exit;
+    }
+    _remaining = (*e)->GetArrayLength(e, renderbuffers_ref) - offset;
+    if (_remaining < n) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "length - offset < n < needed";
+        goto exit;
+    }
+    buffers_base = (GLuint *)
+        (*e)->GetPrimitiveArrayCritical(e, renderbuffers_ref, (jboolean *)0);
+    buffers = buffers_base + offset;
+
+    glGenRenderbuffers(
+        (GLsizei)n,
+        (GLuint *)buffers
+    );
+
+exit:
+    if (buffers_base) {
+        (*e)->ReleasePrimitiveArrayCritical(e, renderbuffers_ref, buffers_base,
+            _exception ? JNI_ABORT: 0);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGenTextures(JNIEnv* e, jobject c, jint n, jintArray textures_ref, jint offset) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    GLuint *buffers_base = (GLuint *) 0;
+    jint _remaining;
+    GLuint *buffers = (GLuint *) 0;
+
+    if (!textures_ref) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "buffers == null";
+        goto exit;
+    }
+    if (offset < 0) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "offset < 0";
+        goto exit;
+    }
+    _remaining = (*e)->GetArrayLength(e, textures_ref) - offset;
+    if (_remaining < n) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "length - offset < n < needed";
+        goto exit;
+    }
+    buffers_base = (GLuint *)
+        (*e)->GetPrimitiveArrayCritical(e, textures_ref, (jboolean *)0);
+    buffers = buffers_base + offset;
+
+    glGenTextures(
+        (GLsizei)n,
+        (GLuint *)buffers
+    );
+
+exit:
+    if (buffers_base) {
+        (*e)->ReleasePrimitiveArrayCritical(e, textures_ref, buffers_base,
+            _exception ? JNI_ABORT: 0);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGenerateMipmap(JNIEnv* e, jobject c, jint target) {
+    glGenerateMipmap(
+        (GLenum)target
+    );
+}
+
+JNIEXPORT jint JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGetAttribLocation(JNIEnv* e, jobject c, jint program, jstring name) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    GLint _returnValue = 0;
+    const char* _nativename = 0;
+
+    if (!name) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "name == null";
+        goto exit;
+    }
+    _nativename = (*e)->GetStringUTFChars(e, name, 0);
+
+    _returnValue = glGetAttribLocation(
+        (GLuint)program,
+        (char *)_nativename
+    );
+
+exit:
+    if (_nativename) {
+        (*e)->ReleaseStringUTFChars(e, name, _nativename);
+    }
+
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+    return (jint)_returnValue;
+}
+
+JNIEXPORT jint JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGetError(JNIEnv* e, jobject c) {
+    GLenum _returnValue;
+    _returnValue = glGetError();
+    return (jint)_returnValue;
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGetFramebufferAttachmentParameteriv(JNIEnv* e, jobject c, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    GLint *params_base = (GLint *) 0;
+    jint _remaining;
+    GLint *params = (GLint *) 0;
+
+    if (!params_ref) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "params == null";
+        goto exit;
+    }
+    if (offset < 0) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "offset < 0";
+        goto exit;
+    }
+    _remaining = (*e)->GetArrayLength(e, params_ref) - offset;
+    params_base = (GLint *)
+        (*e)->GetPrimitiveArrayCritical(e, params_ref, (jboolean *)0);
+    params = params_base + offset;
+
+    glGetFramebufferAttachmentParameteriv(
+        (GLenum)target,
+        (GLenum)attachment,
+        (GLenum)pname,
+        (GLint *)params
+    );
+
+exit:
+    if (params_base) {
+        (*e)->ReleasePrimitiveArrayCritical(e, params_ref, params_base,
+            _exception ? JNI_ABORT: 0);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGetIntegerv(JNIEnv* e, jobject c, jint pname, jintArray params_ref, jint offset) {
+    jint _exception = 0;
+    const char * _exceptionType;
+    const char * _exceptionMessage;
+    GLint *params_base = (GLint *) 0;
+    jint _remaining;
+    GLint *params = (GLint *) 0;
+    int _needed = 0;
+
+    if (!params_ref) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "params == null";
+        goto exit;
+    }
+    if (offset < 0) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "offset < 0";
+        goto exit;
+    }
+    _remaining = (*e)->GetArrayLength(e, params_ref) - offset;
+    _needed = getNeededCount(pname);
+    // if we didn't find this pname, we just assume the user passed
+    // an array of the right size -- this might happen with extensions
+    // or if we forget an enum here.
+    if (_remaining < _needed) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "length - offset < needed";
+        goto exit;
+    }
+    params_base = (GLint *)
+        (*e)->GetPrimitiveArrayCritical(e, params_ref, (jboolean *)0);
+    params = params_base + offset;
+
+    glGetIntegerv(
+        (GLenum)pname,
+        (GLint *)params
+    );
+
+exit:
+    if (params_base) {
+        (*e)->ReleasePrimitiveArrayCritical(e, params_ref, params_base,
+            _exception ? JNI_ABORT: 0);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT jstring JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGetProgramInfoLog(JNIEnv* e, jobject c, jint program) {
+	GLsizei size = 0;
+	glGetProgramiv((GLuint)program, GL_INFO_LOG_LENGTH, &size);
+	
+	GLchar *infoLog;
+
+	if (!size) {
+		return  (*e)->NewStringUTF(e, "");
+	}
+	
+	infoLog = malloc(sizeof(GLchar) * size);
+    if (infoLog == NULL) {
+        jniThrowException(e, "java/lang/IllegalArgumentException", "out of memory");
+        return NULL;
+    }
+	
+	glGetProgramInfoLog((GLuint)program, size, NULL, infoLog);
+	jstring log = (*e)->NewStringUTF(e, infoLog);
+	free(infoLog);
+
+	return log; 
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGetProgramiv(JNIEnv* e, jobject c, jint program, jint pname, jintArray params_ref, jint offset) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    GLint *params_base = (GLint *) 0;
+    jint _remaining;
+    GLint *params = (GLint *) 0;
+
+    if (!params_ref) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "params == null";
+        goto exit;
+    }
+    if (offset < 0) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "offset < 0";
+        goto exit;
+    }
+    _remaining = (*e)->GetArrayLength(e, params_ref) - offset;
+    if (_remaining < 1) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "length - offset < 1 < needed";
+        goto exit;
+    }
+    params_base = (GLint *)
+        (*e)->GetPrimitiveArrayCritical(e, params_ref, (jboolean *)0);
+    params = params_base + offset;
+
+    glGetProgramiv(
+        (GLuint)program,
+        (GLenum)pname,
+        (GLint *)params
+    );
+
+exit:
+    if (params_base) {
+        (*e)->ReleasePrimitiveArrayCritical(e, params_ref, params_base,
+            _exception ? JNI_ABORT: 0);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT jstring JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGetShaderInfoLog(JNIEnv* e, jobject c, jint shader) {
+	GLsizei size = 0;
+	glGetShaderiv((GLuint)shader, GL_INFO_LOG_LENGTH, &size);
+	
+	GLchar *infoLog;
+
+	if (!size) {
+		return  (*e)->NewStringUTF(e, "");
+	}
+	
+	infoLog = malloc(sizeof(GLchar) * size);
+    if (infoLog == NULL) {
+        jniThrowException(e, "java/lang/IllegalArgumentException", "out of memory");
+        return NULL;
+    }
+	
+	glGetShaderInfoLog((GLuint)shader, size, NULL, infoLog);
+	jstring log = (*e)->NewStringUTF(e, infoLog);
+	free(infoLog);
+
+	return log; 
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGetShaderiv(JNIEnv* e, jobject c, jint shader, jint pname, jintArray params_ref, jint offset) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    GLint *params_base = (GLint *) 0;
+    jint _remaining;
+    GLint *params = (GLint *) 0;
+
+    if (!params_ref) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "params == null";
+        goto exit;
+    }
+    if (offset < 0) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "offset < 0";
+        goto exit;
+    }
+    _remaining = (*e)->GetArrayLength(e, params_ref) - offset;
+    if (_remaining < 1) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "length - offset < 1 < needed";
+        goto exit;
+    }
+    params_base = (GLint *)
+        (*e)->GetPrimitiveArrayCritical(e, params_ref, (jboolean *)0);
+    params = params_base + offset;
+
+    glGetShaderiv(
+        (GLuint)shader,
+        (GLenum)pname,
+        (GLint *)params
+    );
+
+exit:
+    if (params_base) {
+        (*e)->ReleasePrimitiveArrayCritical(e, params_ref, params_base,
+            _exception ? JNI_ABORT: 0);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT jstring JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGetString(JNIEnv* e, jobject c, jint name) {
+	const GLubyte* value = glGetString((GLenum) name);
+
+	return (*e)->NewStringUTF(e, (const char*)value); 
+}
+
+JNIEXPORT jint JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glGetUniformLocation(JNIEnv* e, jobject c, jint program, jstring name) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    GLint _returnValue = 0;
+    const char* _nativename = 0;
+
+    if (!name) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "name == null";
+        goto exit;
+    }
+    _nativename = (*e)->GetStringUTFChars(e, name, 0);
+
+    _returnValue = glGetUniformLocation(
+        (GLuint)program,
+        (char *)_nativename
+    );
+
+exit:
+    if (_nativename) {
+        (*e)->ReleaseStringUTFChars(e, name, _nativename);
+    }
+
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+    return (jint)_returnValue;
+}
+
+JNIEXPORT jboolean JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glIsFramebuffer(JNIEnv* e, jobject c, jint framebuffer) {
+    GLboolean _returnValue;
+    _returnValue = glIsFramebuffer(
+        (GLuint)framebuffer
+    );
+    return (jboolean)_returnValue;
+}
+
+JNIEXPORT jboolean JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glIsRenderbuffer(JNIEnv* e, jobject c, jint renderbuffer) {
+    GLboolean _returnValue;
+    _returnValue = glIsRenderbuffer(
+        (GLuint)renderbuffer
+    );
+    return (jboolean)_returnValue;
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glLineWidth(JNIEnv* e, jobject c, jfloat width) {
+    glLineWidth(
+        (GLfloat)width
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glLinkProgram(JNIEnv* e, jobject c, jint program) {
+    glLinkProgram(
+        (GLuint)program
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glPixelStorei(JNIEnv* e, jobject c, jint pname, jint param) {
+    glPixelStorei(
+        (GLenum)pname,
+        (GLint)param
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glPolygonOffset(JNIEnv* e, jobject c, jfloat factor, jfloat units) {
+    glPolygonOffset(
+        (GLfloat)factor,
+        (GLfloat)units
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glReadPixels(JNIEnv* e, jobject c, jint vpX, jint vpY, jint vpW, jint vpH, jint format, jint type, jobject pixels_buf) {
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLvoid *pixels = (GLvoid *) 0;
+
+    pixels = (GLvoid *)getPointer(e, pixels_buf, &_array, &_remaining, &_bufferOffset);
+    if (pixels == NULL) {
+        char * _pixelsBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
+    }
+    glReadPixels(
+        (GLint)vpX,
+        (GLint)vpY,
+        (GLsizei)vpW,
+        (GLsizei)vpH,
+        (GLenum)format,
+        (GLenum)type,
+        (GLvoid *)pixels
+    );
+    if (_array) {
+        releasePointer(e, _array, pixels, JNI_TRUE);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glReadPixels2(JNIEnv* e, jobject c, jint vpX, jint vpY, jint vpW, jint vpH, jint format, jint type, jintArray pixels, jint offset, jint size) {
+	GLint* bufferNative = malloc(size);
+	
+    glReadPixels(
+        (GLint)vpX,
+        (GLint)vpY,
+        (GLsizei)vpW,
+        (GLsizei)vpH,
+        (GLenum)format,
+        (GLenum)type,
+        (GLvoid *)bufferNative
+    );
+	
+	(*e)->SetIntArrayRegion(e, pixels, offset, size, bufferNative);
+	
+	free(bufferNative);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glRenderbufferStorage(JNIEnv* e, jobject c, jint target, jint internalformat, jint width, jint height) {
+    glRenderbufferStorage(
+        (GLenum)target,
+        (GLenum)internalformat,
+        (GLsizei)width,
+        (GLsizei)height
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glScissor(JNIEnv* e, jobject c, jint x, jint y, jint width, jint height) {
+    glScissor(
+        (GLint)x,
+        (GLint)y,
+        (GLsizei)width,
+        (GLsizei)height
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glShaderSource(JNIEnv* e, jobject c, jint shader, jstring string) {
+	const char *stringNative = (*e)->GetStringUTFChars(e, string, NULL);
+	glShaderSource(shader, 1, &stringNative, NULL);
+	//jsize stringLen = (*e)->GetStringUTFLength(e, string);
+	//const char** code = { stringNative };
+	//const GLint* length = { stringLen };
+	
+	printf("upload shader source: %s", stringNative);
+
+	//glShaderSource(shader, 1, code, length);
+	
+	(*e)->ReleaseStringUTFChars(e, string, stringNative);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glTexImage2D(JNIEnv* e, jobject c, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLvoid *pixels = (GLvoid *) 0;
+
+    if (pixels_buf) {
+        pixels = (GLvoid *)getPointer(e, pixels_buf, &_array, &_remaining, &_bufferOffset);
+    }
+    if (pixels_buf && pixels == NULL) {
+        char * _pixelsBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
+    }
+    glTexImage2D(
+        (GLenum)target,
+        (GLint)level,
+        (GLint)internalformat,
+        (GLsizei)width,
+        (GLsizei)height,
+        (GLint)border,
+        (GLenum)format,
+        (GLenum)type,
+        (GLvoid *)pixels
+    );
+    if (_array) {
+        releasePointer(e, _array, pixels, JNI_FALSE);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glTexParameteri(JNIEnv* e, jobject c, jint target, jint pname, jint param) {
+    glTexParameteri(
+        (GLenum)target,
+        (GLenum)pname,
+        (GLint)param
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glTexSubImage2D(JNIEnv* e, jobject c, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLvoid *pixels = (GLvoid *) 0;
+
+    if (pixels_buf) {
+        pixels = (GLvoid *)getPointer(e, pixels_buf, &_array, &_remaining, &_bufferOffset);
+    }
+    if (pixels_buf && pixels == NULL) {
+        char * _pixelsBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
+    }
+    glTexSubImage2D(
+        (GLenum)target,
+        (GLint)level,
+        (GLint)xoffset,
+        (GLint)yoffset,
+        (GLsizei)width,
+        (GLsizei)height,
+        (GLenum)format,
+        (GLenum)type,
+        (GLvoid *)pixels
+    );
+    if (_array) {
+        releasePointer(e, _array, pixels, JNI_FALSE);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform1f(JNIEnv* e, jobject c, jint location, jfloat x) {
+    glUniform1f(
+        (GLint)location,
+        (GLfloat)x
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform1fv(JNIEnv* e, jobject c, jint location, jint count, jobject v_buf) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLfloat *v = (GLfloat *) 0;
+
+    v = (GLfloat *)getPointer(e, v_buf, &_array, &_remaining, &_bufferOffset);
+    if (_remaining < count) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "remaining() < count < needed";
+        goto exit;
+    }
+    if (v == NULL) {
+        char * _vBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        v = (GLfloat *) (_vBase + _bufferOffset);
+    }
+    glUniform1fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLfloat *)v
+    );
+
+exit:
+    if (_array) {
+        releasePointer(e, _array, v, JNI_FALSE);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform1fv2(JNIEnv* e, jobject c, jint location, jint count, jfloatArray v, jint offset) {
+	jfloat *vNative = (*e)->GetFloatArrayElements(e, v, NULL);
+	
+    glUniform1fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLfloat *)(vNative + offset * sizeof(GLfloat))
+    );
+	
+	(*e)->ReleaseFloatArrayElements(e, v, vNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform1i(JNIEnv* e, jobject c, jint location, jint x) {
+    glUniform1i(
+        (GLint)location,
+        (GLint)x
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform1iv(JNIEnv* e, jobject c, jint location, jint count, jobject v_buf) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLint *v = (GLint *) 0;
+
+    v = (GLint *)getPointer(e, v_buf, &_array, &_remaining, &_bufferOffset);
+    if (_remaining < count) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "remaining() < count < needed";
+        goto exit;
+    }
+    if (v == NULL) {
+        char * _vBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        v = (GLint *) (_vBase + _bufferOffset);
+    }
+    glUniform1iv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLint *)v
+    );
+
+exit:
+    if (_array) {
+        releasePointer(e, _array, v, JNI_FALSE);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform1iv2(JNIEnv* e, jobject c, jint location, jint count, jintArray v, jint offset) {
+	jint *vNative = (*e)->GetIntArrayElements(e, v, NULL);
+	
+    glUniform1iv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLint *)(vNative + offset * sizeof(GLint))
+    );
+	glUniform1iv(location, count, vNative + offset);
+	
+	(*e)->ReleaseIntArrayElements(e, v, vNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform2f(JNIEnv* e, jobject c, jint location, jfloat x, jfloat y) {
+    glUniform2f(
+        (GLint)location,
+        (GLfloat)x,
+        (GLfloat)y
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform2fv(JNIEnv* e, jobject c, jint location, jint count, jobject v_buf) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLfloat *v = (GLfloat *) 0;
+
+    v = (GLfloat *)getPointer(e, v_buf, &_array, &_remaining, &_bufferOffset);
+    if (_remaining < count*2) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "remaining() < count*2 < needed";
+        goto exit;
+    }
+    if (v == NULL) {
+        char * _vBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        v = (GLfloat *) (_vBase + _bufferOffset);
+    }
+    glUniform2fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLfloat *)v
+    );
+
+exit:
+    if (_array) {
+        releasePointer(e, _array, v, JNI_FALSE);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform2fv2(JNIEnv* e, jobject c, jint location, jint count, jfloatArray v, jint offset) {
+	jfloat *vNative = (*e)->GetFloatArrayElements(e, v, NULL);
+	
+    glUniform2fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLfloat *)(vNative + offset * sizeof(GLfloat))
+    );
+	
+	(*e)->ReleaseFloatArrayElements(e, v, vNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform3f(JNIEnv* e, jobject c, jint location, jfloat x, jfloat y, jfloat z) {
+    glUniform3f(
+        (GLint)location,
+        (GLfloat)x,
+        (GLfloat)y,
+        (GLfloat)z
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform3fv(JNIEnv* e, jobject c, jint location, jint count, jobject v_buf) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLfloat *v = (GLfloat *) 0;
+
+    v = (GLfloat *)getPointer(e, v_buf, &_array, &_remaining, &_bufferOffset);
+    if (_remaining < count * 3) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "remaining() < count*3 < needed";
+        goto exit;
+    }
+    if (v == NULL) {
+        char * _vBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        v = (GLfloat *) (_vBase + _bufferOffset);
+    }
+    glUniform3fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLfloat *)v
+    );
+
+exit:
+    if (_array) {
+        releasePointer(e, _array, v, JNI_FALSE);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform3fv2(JNIEnv* e, jobject c, jint location, jint count, jfloatArray v, jint offset) {
+	jfloat *vNative = (*e)->GetFloatArrayElements(e, v, NULL);
+	
+    glUniform3fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLfloat *)(vNative + offset * sizeof(GLfloat))
+    );
+	
+	(*e)->ReleaseFloatArrayElements(e, v, vNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform4f(JNIEnv* e, jobject c, jint location, jfloat x, jfloat y, jfloat z, jfloat w) {
+    glUniform4f(
+        (GLint)location,
+        (GLfloat)x,
+        (GLfloat)y,
+        (GLfloat)z,
+        (GLfloat)w
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform4fv(JNIEnv* e, jobject c, jint location, jint count, jobject v_buf) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLfloat *v = (GLfloat *) 0;
+
+    v = (GLfloat *)getPointer(e, v_buf, &_array, &_remaining, &_bufferOffset);
+    if (_remaining < count * 4) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "remaining() < count*4 < needed";
+        goto exit;
+    }
+    if (v == NULL) {
+        char * _vBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        v = (GLfloat *) (_vBase + _bufferOffset);
+    }
+    glUniform4fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLfloat *)v
+    );
+
+exit:
+    if (_array) {
+        releasePointer(e, _array, v, JNI_FALSE);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniform4fv2(JNIEnv* e, jobject c, jint location, jint count, jfloatArray v, jint offset) {
+	jfloat *vNative = (*e)->GetFloatArrayElements(e, v, NULL);
+	
+    glUniform4fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLfloat *)(vNative + offset * sizeof(GLfloat))
+    );
+	
+	(*e)->ReleaseFloatArrayElements(e, v, vNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniformMatrix3fv(JNIEnv* e, jobject c, jint location, jint count, jboolean transpose, jobject value_buf) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLfloat *value = (GLfloat *) 0;
+
+    value = (GLfloat *)getPointer(e, value_buf, &_array, &_remaining, &_bufferOffset);
+    if (_remaining < count*9) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "remaining() < count*9 < needed";
+        goto exit;
+    }
+    if (value == NULL) {
+        char * _valueBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        value = (GLfloat *) (_valueBase + _bufferOffset);
+    }
+    glUniformMatrix3fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLboolean)transpose,
+        (GLfloat *)value
+    );
+
+exit:
+    if (_array) {
+        releasePointer(e, _array, value, JNI_FALSE);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniformMatrix3fv2(JNIEnv* e, jobject c, jint location, jint count, jboolean transpose, jfloatArray value, jint offset) {
+	jfloat *vNative = (*e)->GetFloatArrayElements(e, value, NULL);
+	
+    glUniformMatrix3fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLboolean)transpose,
+        (GLfloat *)(vNative + offset * sizeof(GLfloat))
+    );
+	
+	(*e)->ReleaseFloatArrayElements(e, value, vNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniformMatrix4fv(JNIEnv* e, jobject c, jint location, jint count, jboolean transpose, jobject value_buf) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    GLfloat *value = (GLfloat *) 0;
+
+    value = (GLfloat *)getPointer(e, value_buf, &_array, &_remaining, &_bufferOffset);
+    if (_remaining < count * 16) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "remaining() < count*16 < needed";
+        goto exit;
+    }
+    if (value == NULL) {
+        char * _valueBase = (char *)(*e)->GetPrimitiveArrayCritical(e, _array, (jboolean *) 0);
+        value = (GLfloat *) (_valueBase + _bufferOffset);
+    }
+    glUniformMatrix4fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLboolean)transpose,
+        (GLfloat *)value
+    );
+
+exit:
+    if (_array) {
+        releasePointer(e, _array, value, JNI_FALSE);
+    }
+    if (_exception) {
+        jniThrowException(e, _exceptionType, _exceptionMessage);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUniformMatrix4fv2(JNIEnv* e, jobject c, jint location, jint count, jboolean transpose, jfloatArray value, jint offset) {
+	jfloat *vNative = (*e)->GetFloatArrayElements(e, value, NULL);
+	
+    glUniformMatrix4fv(
+        (GLint)location,
+        (GLsizei)count,
+        (GLboolean)transpose,
+        (GLfloat *)(vNative + offset * sizeof(GLfloat))
+    );
+	
+	(*e)->ReleaseFloatArrayElements(e, value, vNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glUseProgram(JNIEnv* e, jobject c, jint program) {
+    glUseProgram(
+        (GLuint)program
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glVertexAttribPointer(JNIEnv* e, jobject c, jint indx, jint size, jint type, jboolean normalized, jint stride, jobject buffer) {
+    GLvoid *ptr = (GLvoid *) 0;
+
+    if (buffer) {
+        ptr = (GLvoid *) getDirectBufferPointer(e, buffer);
+        if (!ptr) {
+            return;
+        }
+    }
+    glVertexAttribPointer(
+        (GLuint)indx,
+        (GLint)size,
+        (GLenum)type,
+        (GLboolean)normalized,
+        (GLsizei)stride,
+        (GLvoid *)ptr
+    );
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glVertexAttribPointer2(JNIEnv* e, jobject c, jint indx, jint size, jint type, jboolean normalized, jint stride, jbyteArray ptr, jint offset) {
+	jbyte *ptrNative = (*e)->GetByteArrayElements(e, ptr, NULL);
+	
+    glVertexAttribPointer(
+        (GLuint)indx,
+        (GLint)size,
+        (GLenum)type,
+        (GLboolean)normalized,
+        (GLsizei)stride,
+        (GLvoid *)(ptrNative + offset)
+    );
+	
+	(*e)->ReleaseByteArrayElements(e, ptr, ptrNative, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_com_jme3_renderer_ios_JmeIosGLES_glViewport(JNIEnv* e, jobject c, jint x, jint y, jint width, jint height) {
+    glViewport(
+        (GLint)x,
+        (GLint)y,
+        (GLsizei)width,
+        (GLsizei)height
+    );
+}
+
+static int
+allowIndirectBuffers(JNIEnv *e) {
+    return 0;
+}
+
+static void *
+getDirectBufferPointer(JNIEnv *e, jobject buffer) {
+    if (!buffer) {
+        return NULL;
+    }
+    
+    if (!initialized) {
+    	nativeClassInit(e);
+    }
+
+    void* buf = (*e)->GetDirectBufferAddress(e, buffer);
+    if (buf) {
+        jint position = (*e)->GetIntField(e, buffer, positionID);
+        jint elementSizeShift = getBufferElementSize(e, buffer);
+        buf = ((char*) buf) + (position << elementSizeShift);
+    } else {
+            jniThrowException(e, "java/lang/IllegalArgumentException",
+                              "Must use a native order direct Buffer");
+    }
+    return buf;
+}
+
+static void *
+getPointer(JNIEnv *e, jobject buffer, jarray *array, jint *remaining, jint *offset) {
+    jint position;
+    jint limit;
+    jint elementSizeShift;
+    jlong pointer;
+    
+    if (!buffer) {
+        return NULL;
+    }
+    
+    if (!initialized) {
+    	nativeClassInit(e);
+    }
+
+    position = (*e)->GetIntField(e, buffer, positionID);
+    limit = (*e)->GetIntField(e, buffer, limitID);
+    elementSizeShift = getBufferElementSize(e, buffer);
+    
+    array = (void*) NULL;
+    *remaining = (limit - position) << elementSizeShift; 
+    *offset = position;
+    
+    return getDirectBufferPointer(e, buffer);
+}
+
+
+static void
+nativeClassInit(JNIEnv *e) {
+    if (!byteBufferClass) {
+    	jclass byteBufferClassLocal = (*e)->FindClass(e, "java/nio/ByteBuffer");
+    	byteBufferClass = (jclass) (*e)->NewGlobalRef(e, byteBufferClassLocal);
+    }
+    
+    if (!shortBufferClass) {
+    	jclass shortBufferClassLocal = (*e)->FindClass(e, "java/nio/ShortBuffer");
+    	shortBufferClass = (jclass) (*e)->NewGlobalRef(e, shortBufferClassLocal);
+    }
+    
+    if (!intBufferClass) {
+    	jclass intBufferClassLocal = (*e)->FindClass(e, "java/nio/IntBuffer");
+    	intBufferClass = (jclass) (*e)->NewGlobalRef(e, intBufferClassLocal);
+    }
+    
+    if (!floatBufferClass) {
+    	jclass floatBufferClassLocal = (*e)->FindClass(e, "java/nio/FloatBuffer");
+    	floatBufferClass = (jclass) (*e)->NewGlobalRef(e, floatBufferClassLocal);
+    }
+    
+    if (!bufferClass) {
+        jclass bufferClassLocal = (*e)->FindClass(e, "java/nio/Buffer");
+        bufferClass = (jclass) (*e)->NewGlobalRef(e, bufferClassLocal);
+    }
+
+    if (!positionID && bufferClass) {
+	    positionID = (*e)->GetFieldID(e, bufferClass, "position", "I");
+	}
+
+    if (!limitID && bufferClass) {
+	    limitID = (*e)->GetFieldID(e, bufferClass, "limit", "I");
+	}
+
+	initialized = floatBufferClass && bufferClass && shortBufferClass && byteBufferClass
+			&& intBufferClass && positionID && limitID;
+			
+	printf("Initializion of java.nio.Buffer access functionality %s\n", initialized ? "succeeded" : "failed");
+}
+
+static void
+releasePointer(JNIEnv *e, jarray array, void *data, jboolean commit) {
+    (*e)->ReleasePrimitiveArrayCritical(e, array, data,
+					   commit ? 0 : JNI_ABORT);
+}
+
+static void
+jniThrowException(JNIEnv *e, const char* type, const char* message) {
+	jclass excCls = (*e)->FindClass(e, type);
+	if (excCls != 0) {
+    	(*e)->ThrowNew(e, excCls, message);
+    }
+}
+
+static jint
+getBufferElementSize(JNIEnv *e, jobject buffer) {
+    if (!buffer) {
+        return 0;
+    }
+
+	if ((*e)->IsInstanceOf(e, buffer, floatBufferClass) == JNI_TRUE) {
+		return 2;
+	} else if ((*e)->IsInstanceOf(e, buffer, intBufferClass) == JNI_TRUE) {
+		return 2;
+	} else if ((*e)->IsInstanceOf(e, buffer, shortBufferClass) == JNI_TRUE) {
+		return 1;
+	}
+	
+	//TODO: check other buffer types
+	return 0;
+}
+
+static int getNeededCount(GLint pname) {
+    int needed = 1;
+#ifdef GL_ES_VERSION_2_0
+    // GLES 2.x pnames
+    switch (pname) {
+        case GL_ALIASED_LINE_WIDTH_RANGE:
+        case GL_ALIASED_POINT_SIZE_RANGE:
+            needed = 2;
+            break;
+
+        case GL_BLEND_COLOR:
+        case GL_COLOR_CLEAR_VALUE:
+        case GL_COLOR_WRITEMASK:
+        case GL_SCISSOR_BOX:
+        case GL_VIEWPORT:
+            needed = 4;
+            break;
+
+        case GL_COMPRESSED_TEXTURE_FORMATS:
+            glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
+            break;
+
+        case GL_SHADER_BINARY_FORMATS:
+            glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
+            break;
+    }
+#endif
+
+#ifdef GL_VERSION_ES_CM_1_1
+    // GLES 1.x pnames
+    switch (pname) {
+        case GL_ALIASED_LINE_WIDTH_RANGE:
+        case GL_ALIASED_POINT_SIZE_RANGE:
+        case GL_DEPTH_RANGE:
+        case GL_SMOOTH_LINE_WIDTH_RANGE:
+        case GL_SMOOTH_POINT_SIZE_RANGE:
+            needed = 2;
+            break;
+
+        case GL_CURRENT_NORMAL:
+        case GL_POINT_DISTANCE_ATTENUATION:
+            needed = 3;
+            break;
+
+        case GL_COLOR_CLEAR_VALUE:
+        case GL_COLOR_WRITEMASK:
+        case GL_CURRENT_COLOR:
+        case GL_CURRENT_TEXTURE_COORDS:
+        case GL_FOG_COLOR:
+        case GL_LIGHT_MODEL_AMBIENT:
+        case GL_SCISSOR_BOX:
+        case GL_VIEWPORT:
+            needed = 4;
+            break;
+
+        case GL_MODELVIEW_MATRIX:
+        case GL_PROJECTION_MATRIX:
+        case GL_TEXTURE_MATRIX:
+            needed = 16;
+            break;
+
+        case GL_COMPRESSED_TEXTURE_FORMATS:
+            glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
+            break;
+    }
+#endif
+    return needed;
+}

+ 41 - 0
jme3-ios/ios-data/templates/src/boot.c

@@ -0,0 +1,41 @@
+#include <stdint.h>
+#include <stdlib.h>
+
+void __cxa_pure_virtual(void) { abort(); }
+
+#define EXPORT __attribute__ ((visibility("default"))) __attribute__ ((used))
+
+#define BOOTIMAGE_BIN(x) _binary_bootimage_bin_##x
+#define CODEIMAGE_BIN(x) _binary_codeimage_bin_##x
+
+extern const uint8_t BOOTIMAGE_BIN(start)[];
+extern const uint8_t BOOTIMAGE_BIN(end)[];
+
+EXPORT const uint8_t*
+bootimageBin(unsigned* size)
+{
+  *size = BOOTIMAGE_BIN(end) - BOOTIMAGE_BIN(start);
+  return BOOTIMAGE_BIN(start);
+}
+
+extern const uint8_t CODEIMAGE_BIN(start)[];
+extern const uint8_t CODEIMAGE_BIN(end)[];
+
+EXPORT const uint8_t*
+codeimageBin(unsigned* size)
+{
+  *size = CODEIMAGE_BIN(end) - CODEIMAGE_BIN(start);
+  return CODEIMAGE_BIN(start);
+}
+
+#define RESOURCES_JAR(x) _binary_resources_jar_##x
+
+extern const uint8_t RESOURCES_JAR(start)[];
+extern const uint8_t RESOURCES_JAR(end)[];
+
+EXPORT const uint8_t*
+resourcesJar(unsigned* size)
+{
+  *size = RESOURCES_JAR(end) - RESOURCES_JAR(start);
+  return RESOURCES_JAR(start);
+}

+ 477 - 0
jme3-ios/ios-data/templates/src/com_jme3_audio_android_AndroidOpenALSoftAudioRenderer.c

@@ -0,0 +1,477 @@
+#include "com_jme3_audio_android_AndroidOpenALSoftAudioRenderer.h"
+#include "OpenAL/alc.h"
+#include "OpenAL/al.h"
+//#include "OpenAL/alext.h"
+#include "OpenAL/oalMacOSX_OALExtensions.h"
+// for fprintf(stderr, "YourApp", "formatted message");
+// #include <android/log.h>
+#include <jni.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+#include <time.h>
+
+
+static jboolean created = JNI_FALSE;
+
+#define BUFFER_COUNT 1
+ALuint* buffers[BUFFER_COUNT] = { 0 };
+ALuint* source = 0;
+
+int getError() {
+    int errorcode = alGetError();
+//    fprintf(stderr, "getError: %d", errorcode);
+    return errorcode;
+}
+
+/* InitAL opens the default device and sets up a context using default
+ * attributes, making the program ready to call OpenAL functions. */
+int InitAL()
+{
+    ALCdevice *device;
+    ALCcontext *ctx;
+
+    /* Open and initialize a device with default settings */
+    device = alcOpenDevice(NULL);
+    if(!device)
+    {
+        fprintf(stderr, "Could not open a device!\n");
+        return 1;
+    }
+
+    ctx = alcCreateContext(device, NULL);
+    fprintf(stderr, "NULL: %d", NULL);
+    fprintf(stderr, "Created context: %d", ctx);
+    fprintf(stderr, "Created context addr: %d", &ctx);
+    if(ctx == NULL || alcMakeContextCurrent(ctx) == ALC_FALSE)
+    {
+        if(ctx != NULL)
+            alcDestroyContext(ctx);
+        alcCloseDevice(device);
+        fprintf(stderr, "Could not set a context!\n");
+        return 1;
+    }
+
+    printf("Opened \"%s\"\n", alcGetString(device, ALC_DEVICE_SPECIFIER));
+    fprintf(stderr, "Opened %s", alcGetString(device, ALC_DEVICE_SPECIFIER));
+    return 0;
+}
+
+/* CloseAL closes the device belonging to the current context, and destroys the
+ * context. */
+void CloseAL()
+{
+    ALCdevice *device;
+    ALCcontext *ctx;
+    ALCboolean result;
+
+//    fprintf(stderr, "Getting current context");
+    ctx = alcGetCurrentContext();
+//    getError();
+    if(ctx == NULL){
+        fprintf(stderr, "No context found");
+        return;
+    }
+
+//    fprintf(stderr, "Getting current context device");
+    device = alcGetContextsDevice(ctx);
+    if(device == NULL) {
+        fprintf(stderr, "No device found");
+        return;
+    } else {
+        fprintf(stderr, "alcGetContextsDevice device: %d", device);
+        fprintf(stderr, "alcGetContextsDevice device addr: %d", &device);
+    }
+//    getError();
+
+//    fprintf(stderr, "Setting context to NULL");
+    result = alcMakeContextCurrent(NULL);
+//    fprintf(stderr, "alcMakeContextCurrent returned");
+//    fprintf(stderr, "alcMakeContextCurrent returned with result: %d", result);
+    if(!result) {
+        fprintf(stderr, "alcMakeContextCurrent failed");
+        return;
+    }
+
+//    fprintf(stderr, "Destroying context: %d", ctx);
+//    fprintf(stderr, "Destroying context addr: %d", &ctx);
+    alcDestroyContext(ctx);
+
+//    fprintf(stderr, "Closing device");
+    result = alcCloseDevice(device);
+//    fprintf(stderr, "alcCloseDevice result: %d", result);
+}
+
+
+JNIEXPORT jboolean JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alIsCreated
+  (JNIEnv* env, jclass cl)
+{
+    return created;
+}
+
+
+JNIEXPORT jboolean JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alCreate
+  (JNIEnv* env, jclass cl)
+{
+//    fprintf(stderr, "Starting Audio Engine");
+
+    InitAL();
+    created = JNI_TRUE;
+    return created;
+
+}
+
+JNIEXPORT jboolean JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDestroy
+  (JNIEnv* env, jclass cl)
+{
+
+//    fprintf(stderr, "alDestroy");
+    CloseAL();
+    created = JNI_FALSE;
+    return created;
+
+}
+
+JNIEXPORT jstring JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alcGetString
+  (JNIEnv* env, jclass cl, jint param)
+{
+//    fprintf(stderr, "alcGetString for param: %d", param);
+
+    ALCdevice *device;
+    ALCcontext *ctx;
+
+    ctx = alcGetCurrentContext();
+    if(ctx != NULL) {
+        device = alcGetContextsDevice(ctx);
+//        fprintf(stderr, "alcGetString param value: %s", alcGetString(device, param));
+        return (*env)->NewStringUTF(env, alcGetString(device, param));
+    }
+}
+
+JNIEXPORT jstring JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGetString
+  (JNIEnv* env, jclass cl, jint param)
+{
+//    fprintf(stderr, "alGetString for param: %d", param);
+//    fprintf(stderr, "alGetString param value: %s", alGetString(param));
+    return (*env)->NewStringUTF(env, alGetString(param));
+}
+
+JNIEXPORT jint JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGenSources
+  (JNIEnv *env, jclass cl)
+{
+    ALuint source;
+    alGenSources(1, &source);
+//    fprintf(stderr, "alGenSources: %d", source);
+    return source;
+}
+
+JNIEXPORT jint JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGetError
+  (JNIEnv *env, jclass cl)
+{
+    return getError();
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDeleteSources
+  (JNIEnv* env, jclass cl, jint numSources, jobject intbufSources)
+{
+//    fprintf(stderr, "alDeleteSources numSources: %d", numSources);
+
+    ALuint* pIntBufSources = (ALuint*) (*env)->GetDirectBufferAddress(env, intbufSources);
+    alDeleteSources((ALsizei)numSources, pIntBufSources);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGenBuffers
+  (JNIEnv* env, jclass cl, jint numBuffers, jobject intbufBuffers)
+{
+    ALuint* pIntBufBuffers = (ALuint*) (*env)->GetDirectBufferAddress(env, intbufBuffers);
+    alGenBuffers((ALsizei)numBuffers, pIntBufBuffers);
+//    for (int i=0; i<numBuffers; i++) {
+//        fprintf(stderr, "alGenBuffers[%d]: %d", i, *(pIntBufBuffers+i));
+//    }
+
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDeleteBuffers
+  (JNIEnv* env, jclass cl, jint numBuffers, jobject intbufBuffers)
+{
+//    fprintf(stderr, "alDeleteBuffers numBuffers: %d", numBuffers);
+
+    ALuint* pIntBufBuffers = (ALuint*) (*env)->GetDirectBufferAddress(env, intbufBuffers);
+//    fprintf(stderr, "alDeleteBuffers Buffers: %d", *pIntBufBuffers);
+//    for (int i=0; i<numBuffers; i++) {
+//        if(alIsBuffer(*(pIntBufBuffers+i)) == AL_TRUE) {
+//            fprintf(stderr, "alDeleteBuffers[%d]: %d", i, *(pIntBufBuffers+i));
+//            fprintf(stderr, "alDeleteBuffers buffer is a known buffer");
+//        }
+//    }
+    alDeleteBuffers((ALsizei)numBuffers, pIntBufBuffers);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourceStop
+  (JNIEnv *env, jclass cl, jint source)
+{
+//    fprintf(stderr, "alSourceStop for source: %d", source);
+    alSourceStop((ALuint)source);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourcei
+  (JNIEnv *env, jclass cl, jint source, jint param, jint value)
+{
+//    fprintf(stderr, "alSourcei for source: %d, param: %d, value: %d", source, param, value);
+    alSourcei((ALuint)source, (ALenum)param, (ALint)value);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alBufferData
+  (JNIEnv* env, jclass cö, jint buffer, jint format, jobject bufferData, jint bufferSize, jint frequency)
+{
+//    fprintf(stderr, "alBufferData for source: %d, format: %d, size: %d, frequency: %d", buffer, format, bufferSize, frequency);
+    ALuint* pBufferData = (ALuint*) (*env)->GetDirectBufferAddress(env, bufferData);
+    alBufferData((ALuint)buffer, (ALenum)format, pBufferData, (ALsizei)bufferSize, (ALsizei)frequency);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourcePlay
+  (JNIEnv *env, jclass cl, jint source)
+{
+//    fprintf(stderr, "alSourcePlay for source: %d", source);
+    alSourcePlay((ALuint)source);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourcePause
+  (JNIEnv *env, jclass cl, jint source)
+{
+//    fprintf(stderr, "alSourcePause for source: %d", source);
+    alSourcePause((ALuint)source);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourcef
+  (JNIEnv *env, jclass cl, jint source, jint param, jfloat value)
+{
+//    fprintf(stderr, "alSourcef for source: %d, param: %d, value: %f", source, param, value);
+    alSourcef((ALuint)source, (ALenum)param, (ALfloat)value);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSource3f
+  (JNIEnv *env, jclass cl, jint source, jint param, jfloat value1, jfloat value2, jfloat value3)
+{
+//    fprintf(stderr, "alSource3f for source: %d, param: %d, value1: %f, value2: %f, value3: %f", source, param, value1, value2, value3);
+    alSource3f((ALuint)source, (ALenum)param, (ALfloat)value1, (ALfloat)value2, (ALfloat)value3);
+}
+
+JNIEXPORT jint JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGetSourcei
+  (JNIEnv *env, jclass cl, jint source, jint param)
+{
+//    fprintf(stderr, "alGetSourcei for source: %d, param: %d", source, param);
+    ALint result;
+    alGetSourcei((ALuint)source, (ALenum)param, &result);
+    return (jint)result;
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourceUnqueueBuffers
+  (JNIEnv* env, jclass cl, jint source, jint numBuffers, jobject buffers)
+{
+//    fprintf(stderr, "alSourceUnqueueBuffers for source: %d, numBuffers: %d", source, numBuffers);
+    ALuint* pBuffers = (ALuint*) (*env)->GetDirectBufferAddress(env, buffers);
+
+//    for (ALuint i=0; i<numBuffers; i++) {
+//        fprintf(stderr, "alSourceUnqueueBuffers, checking buffer[%d]: %d", i, *(pBuffers+i));
+//        ALboolean isBuffer = alIsBuffer(*(pBuffers+i));
+//        fprintf(stderr, "buffer check result: %d", isBuffer);
+//    }
+    alSourceUnqueueBuffers((ALuint)source, (ALsizei)numBuffers, pBuffers);
+//    for (ALuint i=0; i<numBuffers; i++) {
+//        fprintf(stderr, "alSourceUnqueueBuffers[%d]: %d", i, *(pBuffers+i));
+//    }
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourceQueueBuffers
+  (JNIEnv* env, jclass cl, jint source, jint numBuffers, jobject buffers)
+{
+//    fprintf(stderr, "alSourceQueueBuffers for source: %d, numBuffers: %d", source, numBuffers);
+    ALuint* pBuffers = (ALuint*) (*env)->GetDirectBufferAddress(env, buffers);
+    alSourceQueueBuffers((ALuint)source, (ALsizei)numBuffers, pBuffers);
+//    for (ALuint i=0; i<numBuffers; i++) {
+//        fprintf(stderr, "alSourceQueueBuffers[%d]: %d", i, *(pBuffers+i));
+//    }
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alListener
+  (JNIEnv* env, jclass cl, jint param, jobject bufferData)
+{
+//    fprintf(stderr, "alListener for param: %d", param);
+    ALfloat* pBufferData = (ALfloat*) (*env)->GetDirectBufferAddress(env, bufferData);
+    alListenerfv((ALenum)param, pBufferData);
+//    getError();
+//    for (int i=0; i<4; i++) {
+//        fprintf(stderr, "alListener[%d]: %f", i, *(pBufferData+(i*sizeof(ALfloat))));
+//    }
+
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alListenerf
+  (JNIEnv *env, jclass cl, jint param, jfloat value)
+{
+//    fprintf(stderr, "alListenerf for param: %d, value: %f", param, value);
+    alListenerf((ALenum)param, (ALfloat)value);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alListener3f
+  (JNIEnv *env, jclass cl, jint param, jfloat value1, jfloat value2, jfloat value3)
+{
+//    fprintf(stderr, "alListener3f for param: %d, value1: %f, value2: %f, value3: %f", param, value1, value2, value3);
+    alListener3f((ALenum)param, (ALfloat)value1, (ALfloat)value2, (ALfloat)value3);
+}
+
+JNIEXPORT jboolean JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alcIsExtensionPresent
+  (JNIEnv* env, jclass cl, jstring extension)
+{
+
+    ALCdevice *device;
+    ALCcontext *ctx;
+    ALboolean result;
+//    char buf[128];
+    const char* strExtension;
+    jsize strLength = (*env)->GetStringUTFLength(env, extension);
+
+    ctx = alcGetCurrentContext();
+    if(ctx != NULL) {
+        device = alcGetContextsDevice(ctx);
+
+        if (device != NULL) {
+            strExtension = (*env)->GetStringUTFChars(env, extension, NULL);
+            if (strExtension == NULL) {
+                return JNI_FALSE; /* OutOfMemoryError already thrown */
+            }
+//            fprintf(stderr, "alcIsExtensionPresent for param: %s with size: %d", strExtension, strLength);
+
+            result = alcIsExtensionPresent(device, strExtension);
+//            fprintf(stderr, "alcIsExtensionPresent found: %d", result);
+
+            (*env)->ReleaseStringUTFChars(env, extension, strExtension);
+
+            return (jboolean)result;
+        } else {
+            fprintf(stderr, "device is null in alcIsExtensionPresent");
+        }
+
+    } else {
+        fprintf(stderr, "current context is null in alcIsExtensionPresent");
+    }
+
+    return JNI_FALSE;
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alcGetInteger
+  (JNIEnv* env, jclass cl, jint param, jobject buffer, jint bufferSize)
+{
+    ALCdevice *device;
+    ALCcontext *ctx;
+
+//    fprintf(stderr, "alcGetInteger for param: %d", param);
+    ALCint* pBuffers = (ALCint*) (*env)->GetDirectBufferAddress(env, buffer);
+
+    ctx = alcGetCurrentContext();
+    if(ctx != NULL) {
+        device = alcGetContextsDevice(ctx);
+
+        if (device != NULL) {
+            alcGetIntegerv(device, (ALCenum)param, (ALCsizei)bufferSize, pBuffers);
+        } else {
+            fprintf(stderr, "device is null in alcGetInteger");
+        }
+
+    } else {
+        fprintf(stderr, "current context is null in alcGetInteger");
+    }
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGenAuxiliaryEffectSlots
+  (JNIEnv* env, jclass cl, jint numSlots, jobject buffer)
+{
+//    fprintf(stderr, "alGenAuxiliaryEffectSlots for numSlots: %d", numSlots);
+    ALuint* pBuffers = (ALuint*) (*env)->GetDirectBufferAddress(env, buffer);
+//    alGenAuxiliaryEffectSlots((ALsizei)numSlots, pBuffers);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGenEffects
+  (JNIEnv* env, jclass cl, jint numEffects, jobject buffer)
+{
+//    fprintf(stderr, "alGenEffects for numEffects: %d", numEffects);
+    ALuint* pBuffers = (ALuint*) (*env)->GetDirectBufferAddress(env, buffer);
+//    alGenEffects((ALsizei)numEffects, pBuffers);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alEffecti
+  (JNIEnv *env, jclass cl, jint effect, jint param, jint value)
+{
+//    fprintf(stderr, "alEffecti for effect: %d, param: %d, value: %d", effect, param, value);
+//    alEffecti((ALuint)effect, (ALenum)param, (ALint)value);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alAuxiliaryEffectSloti
+  (JNIEnv *env, jclass cl, jint effectSlot, jint param, jint value)
+{
+//    fprintf(stderr, "alAuxiliaryEffectSloti for effect: %d, param: %d, value: %d", effectSlot, param, value);
+//    alAuxiliaryEffectSloti((ALuint)effectSlot, (ALenum)param, (ALint)value);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDeleteEffects
+  (JNIEnv* env, jclass cl, jint numEffects, jobject buffer)
+{
+//    fprintf(stderr, "alDeleteEffects for numEffects: %d", numEffects);
+    ALuint* pBuffers = (ALuint*) (*env)->GetDirectBufferAddress(env, buffer);
+//    alDeleteEffects((ALsizei)numEffects, pBuffers);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDeleteAuxiliaryEffectSlots
+  (JNIEnv* env, jclass cl, jint numEffectSlots, jobject buffer)
+{
+//    fprintf(stderr, "alDeleteAuxiliaryEffectSlots for numEffectSlots: %d", numEffectSlots);
+    ALuint* pBuffers = (ALuint*) (*env)->GetDirectBufferAddress(env, buffer);
+//    alDeleteAuxiliaryEffectSlots((ALsizei)numEffectSlots, pBuffers);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGenFilters
+  (JNIEnv* env, jclass cl, jint numFilters, jobject buffer)
+{
+//    fprintf(stderr, "alGenFilters for numFilters: %d", numFilters);
+    ALuint* pBuffers = (ALuint*) (*env)->GetDirectBufferAddress(env, buffer);
+//    alGenFilters((ALsizei)numFilters, pBuffers);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alFilteri
+  (JNIEnv *env, jclass cl, jint filter, jint param, jint value)
+{
+//    fprintf(stderr, "alFilteri for filter: %d, param: %d, value: %d", filter, param, value);
+//    alFilteri((ALuint)filter, (ALenum)param, (ALint)value);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alFilterf
+  (JNIEnv *env, jclass cl, jint filter, jint param, jfloat value)
+{
+//    fprintf(stderr, "alFilterf for filter: %d, param: %d, value: %f", filter, param, value);
+//    alFilterf((ALuint)filter, (ALenum)param, (ALfloat)value);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSource3i
+  (JNIEnv *env, jclass cl, jint source, jint param, jint value1, jint value2, jint value3)
+{
+//    fprintf(stderr, "alSource3i for source: %d, param: %d, value1: %d, value2: %d, value3: %d", source, param, value1, value2, value3);
+    alSource3i((ALuint)source, (ALenum)param, (ALint)value1, (ALint)value2, (ALint)value3);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDeleteFilters
+  (JNIEnv* env, jclass cl, jint numFilters, jobject buffer)
+{
+//    fprintf(stderr, "alDeleteFilters for numFilters: %d", numFilters);
+    ALuint* pBuffers = (ALuint*) (*env)->GetDirectBufferAddress(env, buffer);
+//    alDeleteFilters((ALsizei)numFilters, pBuffers);
+}
+
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alEffectf
+  (JNIEnv *env, jclass cl, jint effect, jint param, jfloat value)
+{
+//    fprintf(stderr, "alEffectf for effect: %d, param: %d, value: %d", effect, param, value);
+//    alEffectf((ALuint)effect, (ALenum)param, (ALfloat)value);
+}
+

+ 319 - 0
jme3-ios/ios-data/templates/src/com_jme3_audio_android_AndroidOpenALSoftAudioRenderer.h

@@ -0,0 +1,319 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class com_jme3_audio_android_AndroidOpenALSoftAudioRenderer */
+
+#ifndef _Included_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+#define _Included_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+#ifdef __cplusplus
+extern "C" {
+#endif
+/* Inaccessible static: logger */
+#undef com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_BUFFER_SIZE
+#define com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_BUFFER_SIZE 35280L
+#undef com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_STREAMING_BUFFER_COUNT
+#define com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_STREAMING_BUFFER_COUNT 5L
+#undef com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_MAX_NUM_CHANNELS
+#define com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_MAX_NUM_CHANNELS 64L
+#undef com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_UPDATE_RATE
+#define com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_UPDATE_RATE 0.05f
+/* Inaccessible static: _00024assertionsDisabled */
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alIsCreated
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alIsCreated
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alCreate
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alCreate
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alDestroy
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDestroy
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alcGetString
+ * Signature: (I)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alcGetString
+  (JNIEnv *, jclass, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alGetString
+ * Signature: (I)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGetString
+  (JNIEnv *, jclass, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alGenSources
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGenSources
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alGetError
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGetError
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alDeleteSources
+ * Signature: (ILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDeleteSources
+  (JNIEnv *, jclass, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alGenBuffers
+ * Signature: (ILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGenBuffers
+  (JNIEnv *, jclass, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alDeleteBuffers
+ * Signature: (ILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDeleteBuffers
+  (JNIEnv *, jclass, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alSourceStop
+ * Signature: (I)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourceStop
+  (JNIEnv *, jclass, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alSourcei
+ * Signature: (III)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourcei
+  (JNIEnv *, jclass, jint, jint, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alBufferData
+ * Signature: (IILjava/nio/ByteBuffer;II)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alBufferData
+  (JNIEnv *, jclass, jint, jint, jobject, jint, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alSourcePlay
+ * Signature: (I)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourcePlay
+  (JNIEnv *, jclass, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alSourcePause
+ * Signature: (I)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourcePause
+  (JNIEnv *, jclass, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alSourcef
+ * Signature: (IIF)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourcef
+  (JNIEnv *, jclass, jint, jint, jfloat);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alSource3f
+ * Signature: (IIFFF)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSource3f
+  (JNIEnv *, jclass, jint, jint, jfloat, jfloat, jfloat);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alGetSourcei
+ * Signature: (II)I
+ */
+JNIEXPORT jint JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGetSourcei
+  (JNIEnv *, jclass, jint, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alSourceUnqueueBuffers
+ * Signature: (IILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourceUnqueueBuffers
+  (JNIEnv *, jclass, jint, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alSourceQueueBuffers
+ * Signature: (IILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSourceQueueBuffers
+  (JNIEnv *, jclass, jint, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alListener
+ * Signature: (ILjava/nio/FloatBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alListener
+  (JNIEnv *, jclass, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alListenerf
+ * Signature: (IF)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alListenerf
+  (JNIEnv *, jclass, jint, jfloat);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alListener3f
+ * Signature: (IFFF)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alListener3f
+  (JNIEnv *, jclass, jint, jfloat, jfloat, jfloat);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alcIsExtensionPresent
+ * Signature: (Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alcIsExtensionPresent
+  (JNIEnv *, jclass, jstring);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alcGetInteger
+ * Signature: (ILjava/nio/IntBuffer;I)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alcGetInteger
+  (JNIEnv *, jclass, jint, jobject, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alGenAuxiliaryEffectSlots
+ * Signature: (ILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGenAuxiliaryEffectSlots
+  (JNIEnv *, jclass, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alGenEffects
+ * Signature: (ILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGenEffects
+  (JNIEnv *, jclass, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alEffecti
+ * Signature: (III)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alEffecti
+  (JNIEnv *, jclass, jint, jint, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alAuxiliaryEffectSloti
+ * Signature: (III)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alAuxiliaryEffectSloti
+  (JNIEnv *, jclass, jint, jint, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alDeleteEffects
+ * Signature: (ILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDeleteEffects
+  (JNIEnv *, jclass, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alDeleteAuxiliaryEffectSlots
+ * Signature: (ILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDeleteAuxiliaryEffectSlots
+  (JNIEnv *, jclass, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alGenFilters
+ * Signature: (ILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alGenFilters
+  (JNIEnv *, jclass, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alFilteri
+ * Signature: (III)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alFilteri
+  (JNIEnv *, jclass, jint, jint, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alFilterf
+ * Signature: (IIF)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alFilterf
+  (JNIEnv *, jclass, jint, jint, jfloat);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alSource3i
+ * Signature: (IIIII)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alSource3i
+  (JNIEnv *, jclass, jint, jint, jint, jint, jint);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alDeleteFilters
+ * Signature: (ILjava/nio/IntBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alDeleteFilters
+  (JNIEnv *, jclass, jint, jobject);
+
+/*
+ * Class:     com_jme3_audio_android_AndroidOpenALSoftAudioRenderer
+ * Method:    alEffectf
+ * Signature: (IIF)V
+ */
+JNIEXPORT void JNICALL Java_com_jme3_audio_android_AndroidOpenALSoftAudioRenderer_alEffectf
+  (JNIEnv *, jclass, jint, jint, jfloat);
+
+#ifdef __cplusplus
+}
+#endif
+#endif

+ 143 - 0
jme3-ios/ios-data/templates/src/jme-ios.m

@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2009-2013 jMonkeyEngine
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ *   may be used to endorse or promote products derived from this software
+ *   without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <jni.h>
+#import <UIKit/UIKit.h>
+
+/**
+ * Author: Normen Hansen
+ */
+
+#ifndef JNIEXPORT
+#define JNIEXPORT __attribute__ ((visibility("default"))) \
+  __attribute__ ((used))
+#endif
+
+BOOL checkJNIException(JNIEnv *e){
+    if ((*e)->ExceptionCheck(e)) {
+        (*e)->ExceptionDescribe(e);
+        (*e)->ExceptionClear(e);
+        return YES;
+    }
+    return NO;
+}
+
+#ifndef _Included_com_jme3_system_ios_IosImageLoader
+#define _Included_com_jme3_system_ios_IosImageLoader
+#endif
+
+JNIEXPORT jobject JNICALL
+Java_com_jme3_system_ios_IosImageLoader_loadImageData(JNIEnv* e, jclass obj, jobject imageFormat, jobject inputStream){
+    // prepare java classes and method pointers
+    jclass imageClass = (*e)->FindClass(e, "com.jme3.texture.Image");
+    jclass inputStreamClass = (*e)->FindClass(e, "java.io.InputStream");
+    jclass bufferUtilsClass = (*e)->FindClass(e, "com.jme3.util.BufferUtils");
+    jmethodID imageConstructor = (*e)->GetMethodID(e, imageClass, "<init>", "(Lcom/jme3/texture/Image$Format;IILjava/nio/ByteBuffer;)V");
+    jmethodID readMethod = (*e)->GetMethodID(e, inputStreamClass, "read", "([B)I");
+    jmethodID newBufferMethod = (*e)->GetStaticMethodID(e, bufferUtilsClass, "createByteBuffer", "(I)Ljava/nio/ByteBuffer;");
+    if (checkJNIException(e)) {
+        return nil;
+    }
+    // read data from inputstream via byteArray to NSMutableData
+    jbyteArray tempArray = (*e)->NewByteArray (e, 1000);
+    NSMutableData *inData = [[NSMutableData alloc] init];
+    jint size = (*e)->CallIntMethod(e, inputStream, readMethod, tempArray);
+    if (checkJNIException(e)) {
+        [inData release];
+        return nil;
+    }
+    while (size != -1) {
+        jbyte *data;
+        data = (*e)->GetByteArrayElements(e, tempArray, false);
+        [inData appendBytes:data length:size];
+        (*e)->ReleaseByteArrayElements(e, tempArray, data, JNI_ABORT);
+        size = (*e)->CallIntMethod(e, inputStream, readMethod, tempArray);
+        if (checkJNIException(e)) {
+            [inData release];
+            return nil;
+        }
+    }
+    (*e)->DeleteLocalRef(e, tempArray);
+    if (checkJNIException(e)) {
+        [inData release];
+        return nil;
+    }
+    // decode image data
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    UIImage* inputImage = [UIImage imageWithData:inData];
+    if(inputImage == nil){
+        [inData release];
+        [pool release];
+        return nil;
+    }
+    CGImageRef inImage = [inputImage CGImage];
+    int wdth = CGImageGetWidth(inImage);
+    int ht = CGImageGetHeight(inImage);
+    // NewDirectByteBuffer seems to fail? -> Creating ByteBuffer in java
+    jobject nativeBuffer = (*e)->CallStaticObjectMethod(e, bufferUtilsClass, newBufferMethod, ht*wdth*4);
+    if (checkJNIException(e)) {
+        [inData release];
+        [pool release];
+        return nil;
+    }
+    void *rawData = (*e)->GetDirectBufferAddress(e, nativeBuffer);
+    NSUInteger bytesPerRowImg = CGImageGetBytesPerRow(inImage);
+    NSUInteger bitsPerComponentImg = CGImageGetBitsPerComponent(inImage);
+    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+    CGContextRef context = CGBitmapContextCreate(rawData,wdth,ht,bitsPerComponentImg,bytesPerRowImg,colorSpace,kCGImageAlphaPremultipliedLast| kCGBitmapByteOrder32Big);
+    CGColorSpaceRelease(colorSpace);
+    CGContextDrawImage(context,CGRectMake(0,0,wdth,ht), inImage);
+    CGContextRelease(context);
+    [inData release];
+    [pool release];
+    //create image
+    jobject imageObject = (*e)->NewObject(e, imageClass, imageConstructor, imageFormat, wdth, ht, nativeBuffer);
+    return imageObject;
+}
+
+#ifndef _Included_com_jme3_system_ios_JmeIosSystem
+#define _Included_com_jme3_system_ios_JmeIosSystem
+#endif
+
+JNIEXPORT void JNICALL
+Java_com_jme3_system_ios_JmeIosSystem_showDialog(JNIEnv* e, jobject c, jstring text) {
+    const char* chars = (*e)->GetStringUTFChars(e, text, 0);
+    NSString* string = [[NSString alloc] initWithUTF8String : chars];
+    (*e)->ReleaseStringUTFChars(e, text, chars);
+    UIAlertView *alert = [[UIAlertView alloc] initWithTitle : @"Error"
+                                                    message : string
+                                                   delegate : nil
+                                          cancelButtonTitle : @"OK"
+                                          otherButtonTitles : nil];
+    [alert show];
+    [alert release];
+    [string release];
+}

+ 402 - 0
jme3-ios/licenses.txt

@@ -0,0 +1,402 @@
+*********************
+*LICENSE FOR OPENJDK*
+*********************
+The GNU General Public License (GPL)
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share
+and change it.  By contrast, the GNU General Public License is intended to
+guarantee your freedom to share and change free software--to make sure the
+software is free for all its users.  This General Public License applies to
+most of the Free Software Foundation's software and to any other program whose
+authors commit to using it.  (Some other Free Software Foundation software is
+covered by the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not price.  Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for this service if you wish),
+that you receive source code or can get it if you want it, that you can change
+the software or use pieces of it in new free programs; and that you know you
+can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny
+you these rights or to ask you to surrender the rights.  These restrictions
+translate to certain responsibilities for you if you distribute copies of the
+software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for
+a fee, you must give the recipients all the rights that you have.  You must
+make sure that they, too, receive or can get the source code.  And you must
+show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2)
+offer you this license which gives you legal permission to copy, distribute
+and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that
+everyone understands that there is no warranty for this free software.  If the
+software is modified by someone else and passed on, we want its recipients to
+know that what they have is not the original, so that any problems introduced
+by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents.  We
+wish to avoid the danger that redistributors of a free program will
+individually obtain patent licenses, in effect making the program proprietary.
+To prevent this, we have made it clear that any patent must be licensed for
+everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification
+follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice
+placed by the copyright holder saying it may be distributed under the terms of
+this General Public License.  The "Program", below, refers to any such program
+or work, and a "work based on the Program" means either the Program or any
+derivative work under copyright law: that is to say, a work containing the
+Program or a portion of it, either verbatim or with modifications and/or
+translated into another language.  (Hereinafter, translation is included
+without limitation in the term "modification".) Each licensee is addressed as
+"you".
+
+Activities other than copying, distribution and modification are not covered by
+this License; they are outside its scope.  The act of running the Program is
+not restricted, and the output from the Program is covered only if its contents
+constitute a work based on the Program (independent of having been made by
+running the Program).  Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as
+you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this License
+and to the absence of any warranty; and give any other recipients of the
+Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may
+at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus
+forming a work based on the Program, and copy and distribute such modifications
+or work under the terms of Section 1 above, provided that you also meet all of
+these conditions:
+
+    a) You must cause the modified files to carry prominent notices stating
+    that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in whole or
+    in part contains or is derived from the Program or any part thereof, to be
+    licensed as a whole at no charge to all third parties under the terms of
+    this License.
+
+    c) If the modified program normally reads commands interactively when run,
+    you must cause it, when started running for such interactive use in the
+    most ordinary way, to print or display an announcement including an
+    appropriate copyright notice and a notice that there is no warranty (or
+    else, saying that you provide a warranty) and that users may redistribute
+    the program under these conditions, and telling the user how to view a copy
+    of this License.  (Exception: if the Program itself is interactive but does
+    not normally print such an announcement, your work based on the Program is
+    not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If identifiable
+sections of that work are not derived from the Program, and can be reasonably
+considered independent and separate works in themselves, then this License, and
+its terms, do not apply to those sections when you distribute them as separate
+works.  But when you distribute the same sections as part of a whole which is a
+work based on the Program, the distribution of the whole must be on the terms
+of this License, whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your
+rights to work written entirely by you; rather, the intent is to exercise the
+right to control the distribution of derivative or collective works based on
+the Program.
+
+In addition, mere aggregation of another work not based on the Program with the
+Program (or with a work based on the Program) on a volume of a storage or
+distribution medium does not bring the other work under the scope of this
+License.
+
+3. You may copy and distribute the Program (or a work based on it, under
+Section 2) in object code or executable form under the terms of Sections 1 and
+2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable source
+    code, which must be distributed under the terms of Sections 1 and 2 above
+    on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three years, to
+    give any third party, for a charge no more than your cost of physically
+    performing source distribution, a complete machine-readable copy of the
+    corresponding source code, to be distributed under the terms of Sections 1
+    and 2 above on a medium customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer to
+    distribute corresponding source code.  (This alternative is allowed only
+    for noncommercial distribution and only if you received the program in
+    object code or executable form with such an offer, in accord with
+    Subsection b above.)
+
+The source code for a work means the preferred form of the work for making
+modifications to it.  For an executable work, complete source code means all
+the source code for all modules it contains, plus any associated interface
+definition files, plus the scripts used to control compilation and installation
+of the executable.  However, as a special exception, the source code
+distributed need not include anything that is normally distributed (in either
+source or binary form) with the major components (compiler, kernel, and so on)
+of the operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the source
+code from the same place counts as distribution of the source code, even though
+third parties are not compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as
+expressly provided under this License.  Any attempt otherwise to copy, modify,
+sublicense or distribute the Program is void, and will automatically terminate
+your rights under this License.  However, parties who have received copies, or
+rights, from you under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it.
+However, nothing else grants you permission to modify or distribute the Program
+or its derivative works.  These actions are prohibited by law if you do not
+accept this License.  Therefore, by modifying or distributing the Program (or
+any work based on the Program), you indicate your acceptance of this License to
+do so, and all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program),
+the recipient automatically receives a license from the original licensor to
+copy, distribute or modify the Program subject to these terms and conditions.
+You may not impose any further restrictions on the recipients' exercise of the
+rights granted herein.  You are not responsible for enforcing compliance by
+third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues), conditions
+are imposed on you (whether by court order, agreement or otherwise) that
+contradict the conditions of this License, they do not excuse you from the
+conditions of this License.  If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other pertinent
+obligations, then as a consequence you may not distribute the Program at all.
+For example, if a patent license would not permit royalty-free redistribution
+of the Program by all those who receive copies directly or indirectly through
+you, then the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply and
+the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this
+section has the sole purpose of protecting the integrity of the free software
+distribution system, which is implemented by public license practices.  Many
+people have made generous contributions to the wide range of software
+distributed through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing to
+distribute software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain
+countries either by patents or by copyrighted interfaces, the original
+copyright holder who places the Program under this License may add an explicit
+geographical distribution limitation excluding those countries, so that
+distribution is permitted only in or among countries not thus excluded.  In
+such case, this License incorporates the limitation as if written in the body
+of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the
+General Public License from time to time.  Such new versions will be similar in
+spirit to the present version, but may differ in detail to address new problems
+or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any later
+version", you have the option of following the terms and conditions either of
+that version or of any later version published by the Free Software Foundation.
+If the Program does not specify a version number of this License, you may
+choose any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs
+whose distribution conditions are different, write to the author to ask for
+permission.  For software which is copyrighted by the Free Software Foundation,
+write to the Free Software Foundation; we sometimes make exceptions for this.
+Our decision will be guided by the two goals of preserving the free status of
+all derivatives of our free software and of promoting the sharing and reuse of
+software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE,
+YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
+PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
+BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
+OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible
+use to the public, the best way to achieve this is to make it free software
+which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program.  It is safest to attach
+them to the start of each source file to most effectively convey the exclusion
+of warranty; and each file should have at least the "copyright" line and a
+pointer to where the full notice is found.
+
+    One line to give the program's name and a brief idea of what it does.
+
+    Copyright (C) <year> <name of author>
+
+    This program is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the Free
+    Software Foundation; either version 2 of the License, or (at your option)
+    any later version.
+
+    This program is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+    more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc., 59
+    Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it
+starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
+    with ABSOLUTELY NO WARRANTY; for details type 'show w'.  This is free
+    software, and you are welcome to redistribute it under certain conditions;
+    type 'show c' for details.
+
+The hypothetical commands 'show w' and 'show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may be
+called something other than 'show w' and 'show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.  Here
+is a sample; alter the names:
+
+    Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+    'Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+    signature of Ty Coon, 1 April 1989
+
+    Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General Public
+License instead of this License.
+
+
+"CLASSPATH" EXCEPTION TO THE GPL
+
+Certain source files distributed by Oracle America and/or its affiliates are
+subject to the following clarification and special exception to the GPL, but
+only where Oracle has expressly included in the particular source file's header
+the words "Oracle designates this particular file as subject to the "Classpath"
+exception as provided by Oracle in the LICENSE file that accompanied this code."
+
+    Linking this library statically or dynamically with other modules is making
+    a combined work based on this library.  Thus, the terms and conditions of
+    the GNU General Public License cover the whole combination.
+
+    As a special exception, the copyright holders of this library give you
+    permission to link this library with independent modules to produce an
+    executable, regardless of the license terms of these independent modules,
+    and to copy and distribute the resulting executable under terms of your
+    choice, provided that you also meet, for each linked independent module,
+    the terms and conditions of the license of that module.  An independent
+    module is a module which is not derived from or based on this library.  If
+    you modify this library, you may extend this exception to your version of
+    the library, but you are not obligated to do so.  If you do not wish to do
+    so, delete this exception statement from your version.
+
+
+*******************
+*LICENSE FOR AVIAN*
+*******************
+Copyright (c) 2008-2012, Avian Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+*************
+*JME LICENSE*
+*************
+Copyright (c) 2003-2012 jMonkeyEngine
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+* Neither the name of 'jMonkeyEngine' nor the names of its contributors
+  may be used to endorse or promote products derived from this software
+  without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 6 - 0
jme3-ios/manifest.mf

@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.jme3.gde.ios
+OpenIDE-Module-Implementation-Version: 0
+OpenIDE-Module-Layer: com/jme3/gde/ios/layer.xml
+OpenIDE-Module-Localizing-Bundle: com/jme3/gde/ios/Bundle.properties
+

+ 45 - 0
jme3-ios/nbproject/build-impl.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT  ***
+***         EDIT ../build.xml INSTEAD         ***
+-->
+<project name="com.jme3.gde.ios-impl" basedir="..">
+    <fail message="Please build using Ant 1.7.1 or higher.">
+        <condition>
+            <not>
+                <antversion atleast="1.7.1"/>
+            </not>
+        </condition>
+    </fail>
+    <property file="nbproject/private/suite-private.properties"/>
+    <property file="nbproject/suite.properties"/>
+    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
+    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
+    <property file="${suite.dir}/nbproject/platform.properties"/>
+    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
+        <attribute name="name"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{name}" value="${@{value}}"/>
+        </sequential>
+    </macrodef>
+    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
+        <attribute name="property"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{property}" value="@{value}"/>
+        </sequential>
+    </macrodef>
+    <property file="${user.properties.file}"/>
+    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
+        <condition>
+            <not>
+                <contains string="${cluster.path.evaluated}" substring="platform"/>
+            </not>
+        </condition>
+    </fail>
+    <import file="${harness.dir}/build.xml"/>
+</project>

+ 8 - 0
jme3-ios/nbproject/genfiles.properties

@@ -0,0 +1,8 @@
+build.xml.data.CRC32=8d2930b7
+build.xml.script.CRC32=4596b2c2
[email protected]
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=96566772
+nbproject/build-impl.xml.script.CRC32=b4f92cf6
+nbproject/[email protected]

+ 11 - 0
jme3-ios/nbproject/project.properties

@@ -0,0 +1,11 @@
+javac.source=1.6
+javac.compilerargs=-Xlint -Xlint:-serial
+# avian compile locations
+avian.jdk.path=/Users/normenhansen/Documents/Code-Import/avian-ios/openjdk-1.7.0-u40-unofficial-macosx-x86_64-image
+avian.jdk.src.path=/Users/normenhansen/Documents/Code-Import/avian-ios/openjdk7u40/jdk/src/
+avian.src.path=/Users/normenhansen/Documents/Code-Import/avian-ios/avian/
+hello-ios.src.path=/Users/normenhansen/Documents/Code-Import/avian-ios/hello-ios/
+license.file=licenses.txt
+nbm.homepage=http://www.jmonkeyengine.org/
+nbm.module.author=Normen Hansen
+spec.version.base=3.1.0

+ 88 - 0
jme3-ios/nbproject/project.xml

@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.apisupport.project</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
+            <code-name-base>com.jme3.gde.ios</code-name-base>
+            <suite-component/>
+            <module-dependencies>
+                <dependency>
+                    <code-name-base>com.jme3.gde.core</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>3.0.5</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.46.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.57.1.8</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.dialogs</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.25.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.filesystems</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.62.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.loaders</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.37.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.nodes</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.28.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>8.25.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util.lookup</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>8.15.1</specification-version>
+                    </run-dependency>
+                </dependency>
+            </module-dependencies>
+            <public-packages/>
+        </data>
+    </configuration>
+</project>

+ 1 - 0
jme3-ios/nbproject/suite.properties

@@ -0,0 +1 @@
+suite.dir=${basedir}/..

+ 7 - 0
jme3-ios/src/com/jme3/gde/ios/Bundle.properties

@@ -0,0 +1,7 @@
+avian-data=avian-data
+OpenIDE-Module-Display-Category=jME3 - SDK Plugin
+OpenIDE-Module-Long-Description=\
+    This pre-alpha version of iOS deployment requires MacOSX and XCode.\n\n\
+    See http://jmonkeyengine.org/wiki/doku.php/jme3:ios
+OpenIDE-Module-Name=iOS Support
+OpenIDE-Module-Short-Description=Support for iOS distribution (pre-alpha)

+ 58 - 0
jme3-ios/src/com/jme3/gde/ios/IosImportantFiles.java

@@ -0,0 +1,58 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.jme3.gde.ios;
+
+import com.jme3.gde.core.importantfiles.ImportantFiles;
+import java.util.ArrayList;
+import org.netbeans.api.project.Project;
+import org.openide.filesystems.FileObject;
+import org.openide.loaders.DataObject;
+import org.openide.loaders.DataObjectNotFoundException;
+import org.openide.nodes.Node;
+import org.openide.util.Exceptions;
+
+/**
+ *
+ * @author normenhansen
+ */
[email protected](service = ImportantFiles.class)
+public class IosImportantFiles implements ImportantFiles {
+
+    @Override
+    public Node[] getNodes(Project project) {
+        ArrayList<Node> list = new ArrayList<Node>();
+        try {
+            FileObject mainAct = project.getProjectDirectory().getFileObject("ios/ios.properties");
+            if (mainAct != null) {
+                Node node = DataObject.find(mainAct).getNodeDelegate();
+                node.setDisplayName("iOS Properties");
+                list.add(node);
+            }
+            FileObject manif = project.getProjectDirectory().getFileObject("ios/src/JmeAppHarness.java");
+            if (manif != null) {
+                Node node = DataObject.find(manif).getNodeDelegate();
+                node.setDisplayName("iOS Harness (java)");
+                list.add(node);
+            }
+            FileObject buildProp = project.getProjectDirectory().getFileObject("ios/src/JmeAppHarness.m");
+            if (buildProp != null) {
+                Node node = DataObject.find(buildProp).getNodeDelegate();
+                node.setDisplayName("iOS Harness (native)");
+                list.add(node);
+            }
+        } catch (DataObjectNotFoundException ex) {
+            Exceptions.printStackTrace(ex);
+        }
+        return list.toArray(new Node[list.size()]);
+    }
+
+    @Override
+    public boolean hasFiles(Project proj) {
+        if (proj.getProjectDirectory().getFileObject("ios/ios.properties") != null) {
+            return true;
+        }
+        return false;
+    }
+}

+ 85 - 0
jme3-ios/src/com/jme3/gde/ios/IosTool.java

@@ -0,0 +1,85 @@
+/*
+ *  Copyright (c) 2009-2012 jMonkeyEngine
+ *  All rights reserved.
+ * 
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ * 
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ * 
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jme3.gde.ios;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+
+/**
+ * Various tools for iOS deployment, discovers XCode and SDK locations, SDK
+ * versions and installs the avian resource files.
+ *
+ * @author normenhansen
+ */
+public class IosTool {
+
+    public static String getIosDeveloperRootName() {
+        FileObject devRoot = getIosDeveloperRoot();
+        if (devRoot != null) {
+            return devRoot.getPath();
+        }
+        return null;
+    }
+
+    public static FileObject getIosDeveloperRoot() {
+        File oldDevRoot = new File("/Developer");
+        File newDevRoot = new File("/Applications/Xcode.app/Contents/Developer");
+        if (newDevRoot.exists() && newDevRoot.isDirectory()) {
+            return FileUtil.toFileObject(newDevRoot);
+        } else if (oldDevRoot.exists() && oldDevRoot.isDirectory()) {
+            return FileUtil.toFileObject(oldDevRoot);
+        }
+        return null;
+    }
+
+    public static List<String> getIosSdkVersions(String target) {
+        ArrayList<String> sdkList = new ArrayList<String>();
+        FileObject devRoot = getIosDeveloperRoot();
+        if (devRoot == null) {
+            return sdkList;
+        }
+        FileObject sdkRoot = devRoot.getFileObject("Platforms/" + target + ".platform/Developer/SDKs");
+        FileObject[] sdks = sdkRoot.getChildren();
+        for (FileObject fileObject : sdks) {
+            if (fileObject.isFolder()) {
+                if (fileObject.getName().startsWith(target)) {
+                    sdkList.add(fileObject.getName().substring(target.length(), fileObject.getName().length()));
+                }
+            }
+        }
+        return sdkList;
+    }
+
+}

BIN
jme3-ios/src/com/jme3/gde/ios/ios-data.zip


+ 233 - 0
jme3-ios/src/com/jme3/gde/ios/ios-targets.xml

@@ -0,0 +1,233 @@
+    <target name="build-ios">
+        <antcall target="build-ios-arm" inheritall="false" inheritrefs="false"/>
+        <antcall target="build-ios-arm64" inheritall="false" inheritrefs="false"/>
+        <antcall target="build-ios-i386" inheritall="false" inheritrefs="false"/>
+        <echo>The needed native iOS libraries have been built, open the XCode project at ios/project to run the application on iOS.</echo>
+    </target>
+
+    <target name="build-ios-arm" depends="init, -init-platform-arm, -create-properties, -build-ios" description="Builds iOS libraries for device"/>
+    
+    <target name="build-ios-arm64" depends="init, -init-platform-arm64, -create-properties, -build-ios" description="Builds iOS libraries for device"/>
+    
+    <target name="build-ios-i386" depends="init, -init-platform-i386, -create-properties, -build-ios" description="Builds iOS libraries for simulator"/>
+
+    <target name="-init-platform-arm" description="Initialize for arm platform">
+        <property name="ios.arch" value="arm"/>
+        <property file="ios/ios.properties"/>
+    </target>
+
+    <target name="-init-platform-arm64" description="Initialize for arm64 platform">
+        <property name="ios.arch" value="arm64"/>
+        <property file="ios/ios.properties"/>
+    </target>
+    
+    <target name="-init-platform-i386" description="Initialize for i386 platform">
+        <property name="ios.arch" value="i386"/>
+        <property file="ios/ios.properties"/>
+    </target>
+    
+    <target name="-check-properties-platform" description="Checks the used platform (arm/i386)">
+        <taskdef resource="proguard/ant/task.properties"
+             classpath="${libs.pro-guard.classpath}"/>
+        <condition property="ios.do.arm">
+            <equals arg1="${ios.arch}" arg2="arm"/>
+        </condition>
+        <condition property="ios.do.arm64">
+            <equals arg1="${ios.arch}" arg2="arm64"/>
+        </condition>
+        <condition property="ios.do.i386">
+            <equals arg1="${ios.arch}" arg2="i386"/>
+        </condition>
+    </target>
+    
+    <target name="-create-properties-arm" if="ios.do.arm" description="Sets properties for arm build">
+        <property name="ios.target" value="iPhoneOS"/>
+        <property name="ios.arch.flag" value="${ios.arm.flag}"/>
+        
+        <property name="ios.avian.classpath" value="${ios.avian.arm.classpath}"/>
+        <property name="ios.avian.bootimage-generator" value="${ios.avian.arm.bootimage-generator}"/>
+        <property name="ios.avian.generator" value="${ios.avian.arm.generator}"/>
+        <property name="ios.avian.converter" value="${ios.avian.arm.converter}"/>
+        <property name="ios.avian.binary" value="${ios.avian.arm.binary}"/>
+    </target>
+
+    <target name="-create-properties-arm64" if="ios.do.arm64" description="Sets properties for arm64 build">
+        <property name="ios.target" value="iPhoneOS"/>
+        <property name="ios.arch.flag" value="${ios.arm64.flag}"/>
+        
+        <property name="ios.avian.classpath" value="${ios.avian.arm64.classpath}"/>
+        <property name="ios.avian.bootimage-generator" value="${ios.avian.arm64.bootimage-generator}"/>
+        <property name="ios.avian.generator" value="${ios.avian.arm64.generator}"/>
+        <property name="ios.avian.converter" value="${ios.avian.arm64.converter}"/>
+        <property name="ios.avian.binary" value="${ios.avian.arm64.binary}"/>
+    </target>
+
+    <target name="-create-properties-i386" if="ios.do.i386" description="Sets properties for i386 build">
+        <property name="ios.target" value="iPhoneSimulator"/>
+        <property name="ios.arch.flag" value="${ios.i386.flag}"/>
+        
+        <property name="ios.avian.classpath" value="${ios.avian.i386.classpath}"/>
+        <property name="ios.avian.bootimage-generator" value="${ios.avian.i386.bootimage-generator}"/>
+        <property name="ios.avian.generator" value="${ios.avian.i386.generator}"/>
+        <property name="ios.avian.converter" value="${ios.avian.i386.converter}"/>
+        <property name="ios.avian.binary" value="${ios.avian.i386.binary}"/>
+    </target>
+    
+    <target name="-create-properties" depends="-check-properties-platform, -create-properties-arm, -create-properties-arm64, -create-properties-i386" description="Sets global properties based on platform">
+        <property name="ios.sdk.sysroot" value="${ios.dev.root}/Platforms/${ios.target}.platform/Developer/SDKs/${ios.target}${ios.version}.sdk"/>
+        <property name="ios.cc.compiler.path" value="${ios.dev.root}/Toolchains/XcodeDefault.xctoolchain/usr/bin/${ios.cc.compiler}"/>
+        <property name="ios.cc.flags" value="-isysroot ${ios.sdk.sysroot} -arch ${ios.arch.flag}"/>
+    </target>
+    
+    <target name="-build-ios" depends="-compile-ios-java,
+                                     -package-ios-classpath,
+                                     -make-ios-resourceimage,
+                                     -make-ios-bootimage,
+                                     -compile-ios-native,
+                                     -expand-ios-binary,
+                                     -create-ios-library-list"/>
+    
+    <target name="-compile-ios-java" description="Compiles the java classes for iOS">
+        <mkdir dir="${ios.java.classes.dir}"/>
+        <javac
+            destdir="${ios.java.classes.dir}"
+            srcdir="${ios.cc.source.dir}"
+            classpath="${run.classpath}:${libs.ios-base.classpath}"/>
+        <copy todir="${ios.java.classes.dir}">
+            <fileset dir="${ios.cc.source.dir}" excludes="${build.classes.excludes},${excludes},**/*.c,**/*.m" includes="${includes}"/>
+        </copy>
+    </target>
+    
+    <target name="-check-classpath-uptodate" description="Checks if the iOS classpath needs to be rebuilt">
+        <!--TODO: not very safe check for changes-->
+        <uptodate property="ios.classpath.uptodate" targetfile="${ios.classpath.checkfile}">
+            <srcfiles dir="${build.classes.dir}" includes="**/*.class"/>
+            <srcfiles file="${build.dir}/${assets.jar.name}"/>
+            <srcfiles dir="${ios.cc.source.dir}" includes="**/*.java"/>
+        </uptodate>
+    </target>
+    
+    <target name="-package-ios-classpath" unless="ios.classpath.uptodate" depends="-check-classpath-uptodate" description="Packages the iOS classpath using proguard">
+        <mkdir dir="${ios.build.classes.dir}"/>
+        <echo>Packaging iOS classpath and resources</echo>
+        <!--TODO: use internal references instead of dist/lib output-->
+        <pathconvert pathsep="${path.separator}" property="ios.avian.project.classpath">
+            <path>
+                <fileset dir="${dist.dir}/lib" 
+                        includes="*.jar"
+                        excludes="${ios.jar.excludes}"/>
+                <fileset file="${dist.jar}"/>
+            </path>
+        </pathconvert>
+        <proguard>
+            -injars  ${ios.avian.classpath}:${ios.java.classes.dir}:${libs.ios-base.classpath}:${ios.avian.project.classpath}
+            -outjars ${ios.build.classes.dir}(**.class)
+            -outjars ${ios.build.resources.jar}
+            -include ${ios.proguard.vm.path}
+            -include ${ios.proguard.openjdk.path}
+            -dontusemixedcaseclassnames
+            -dontwarn
+            -dontnote
+            -dontobfuscate
+            -dontoptimize
+            -allowaccessmodification
+            -dontpreverify
+            ${ios.proguard.options}
+        </proguard>
+        <unzip dest="${ios.build.classes.dir}" overwrite="true">
+            <fileset dir="${ios.build.classes.dir}" includes="**/*.jar"/>
+        </unzip>
+        <delete quiet="true">
+            <fileset dir="${ios.build.classes.dir}" includes="**/*.jar"/>
+        </delete>
+        <delete failonerror="false">
+            <fileset dir="${ios.build.classes.dir}" includes="${ios.classpath.excludes}"/>
+        </delete>
+        <touch file="${ios.classpath.checkfile}" verbose="false"/>
+    </target>
+    
+    <target name="-check-images-uptodate" description="Checks if the binary images for iOS are up to date">
+        <uptodate property="ios.images.uptodate" targetfile="${ios.images.checkfile}">
+            <srcfiles dir="${ios.build.classes.dir}" includes="**/*.class"/>
+            <srcfiles file="${ios.build.resources.jar}"/>
+        </uptodate>
+    </target>
+    
+    <target name="-make-ios-resourceimage" unless="ios.images.uptodate" depends="-check-images-uptodate" description="Creates the iOS resources image">
+        <mkdir dir="${ios.build.libs.dir}"/>
+        <delete file="${ios.build.resources.o}"/>
+        <echo>Creating iOS resources object file for ${ios.arch}</echo>
+        <exec executable="${ios.avian.converter}" failonerror="true">
+            <arg line="${ios.build.resources.jar}"/>
+            <arg line="${ios.build.resources.o}"/>
+            <arg line="_binary_resources_jar_start"/>
+            <arg line="_binary_resources_jar_end"/>
+            <arg line="${ios.platform}"/>
+            <arg line="${ios.arch}"/>
+            <arg line="1"/>
+        </exec>
+    </target>
+    
+    <target name="-make-ios-bootimage" unless="ios.images.uptodate" depends="-check-images-uptodate" description="Creates the iOS boot image and code image">
+        <mkdir dir="${ios.build.libs.dir}"/>
+        <delete file="${ios.build.bootimage.o}"/>
+        <delete file="${ios.build.codeimage.o}"/>
+        <echo>Creating iOS bootimage and codeimage for ${ios.arch}</echo>
+        <exec executable="${ios.avian.bootimage-generator}" failonerror="true">
+            <arg line="-cp ${ios.build.classes.dir}"/>
+            <arg line="-bootimage ${ios.build.bootimage.o}"/>
+            <arg line="-codeimage ${ios.build.codeimage.o}"/>
+        </exec>
+        <touch file="${ios.images.checkfile}" verbose="false"/>
+    </target>
+    
+    <target name="-compile-ios-native" description="Compiles the native classes from ios/src for the iOS project">
+        <echo>Compiling native code for ${ios.arch}</echo>
+        <mkdir dir="${ios.build.libs.dir}"/>
+        <apply executable="${ios.cc.compiler.path}" failonerror="true" dir="${ios.build.libs.dir}">
+            <arg value="-c"/>
+            <fileset dir="${ios.cc.source.dir}">
+                <include name="*.c"/>
+                <include name="*.m"/>
+                <modified update="true"
+                        seldirs="true"
+                        cache="propertyfile"
+                        algorithm="digest"
+                        comparator="equal">
+                    <param name="cache.cachefile"     value="${ios.cc.cache}"/>
+                    <param name="algorithm.algorithm" value="MD5"/>
+                </modified>
+            </fileset>
+            <arg line="${ios.cc.flags} ${ios.cc.cflags}"/>
+        </apply>
+    </target>
+
+    <target name="-expand-ios-binary" unless="ios.images.uptodate" description="Expands libavian.a to .o files for the iOS project">
+        <mkdir dir="${ios.build.libs.dir}"/>
+        <echo>Expanding libavian.a for ${ios.arch}</echo>
+        <exec executable="ar" dir="${ios.build.libs.dir}" failonerror="true">
+            <arg line="x"/>
+            <arg line="'${ios.avian.binary}'"/>
+        </exec>
+        <delete file="${ios.build.libs.dir}/__.SYMDEF" failonerror="false" quiet="true"/>
+    </target>
+    
+    <target name="-check-libs-uptodate" description="Checks if the .o library list is up to date">
+        <uptodate property="ios.libs.uptodate" targetfile="${ios.build.libs.file}">
+            <srcfiles dir="${ios.build.libs.dir}" includes="**/*.o"/>
+        </uptodate>
+    </target>
+    
+    <target name="-create-ios-library-list" unless="ios.libs.uptodate" depends="-check-libs-uptodate" description="Creates the .o library list">
+        <echo>Create library list for ${ios.arch}</echo>
+        <pathconvert property="ios.build.arch.dir.resolved">
+            <path path="${basedir}"/>
+        </pathconvert>
+        <fileset id="ios.build.libs.fileset" dir="${ios.build.libs.dir}">
+            <include name="*.o"/>
+        </fileset>
+        <pathconvert pathsep="${line.separator}" property="ios.build.libs.list" refid="ios.build.libs.fileset">
+            <map from="${ios.build.arch.dir.resolved}/" to="../../"/>
+        </pathconvert>
+        <echo file="${ios.build.libs.file}" force="true">${ios.build.libs.list}</echo>
+    </target>

+ 4 - 0
jme3-ios/src/com/jme3/gde/ios/layer.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
+<filesystem>
+</filesystem>

+ 9 - 0
jme3-ios/src/com/jme3/gde/ios/panel/Bundle.properties

@@ -0,0 +1,9 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+LBL_Category_iOS=iOS
+IosCustomizerPanel.jCheckBox1.text=Enable iOS deployment
+IosCustomizerPanel.jLabel1.text=iOS SDK Version
+IosCustomizerPanel.jCheckBox2.text=delete ios folder when disabling deployment
+IosCustomizerPanel.jTextField1.text=com.mycompany.mygame
+IosCustomizerPanel.jLabel2.text=App ID
+IosCustomizerPanel.jTextArea1.text=Note that iOS deployment only works on MacOSX with XCode installed!\n\nWhen building your project the native binaries for iOS will be created and imported in a normal XCode project. After building the project, open the XCode project at ios/project/jme-ios.xcodeproj to configure, run, deploy or send the application to the App Store.\n\nYou can call native Obj-C code by using or adding .java and .m source files located at ios/src.

+ 214 - 0
jme3-ios/src/com/jme3/gde/ios/panel/IosCompositeProvider.java

@@ -0,0 +1,214 @@
+/*
+ *  Copyright (c) 2009-2012 jMonkeyEngine
+ *  All rights reserved.
+ * 
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ * 
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ * 
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jme3.gde.ios.panel;
+
+import com.jme3.gde.ios.IosTool;
+import com.jme3.gde.core.j2seproject.ProjectExtensionManager;
+import com.jme3.gde.core.j2seproject.ProjectExtensionProperties;
+import com.jme3.gde.core.util.ZipExtensionTool;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.swing.JComponent;
+
+import org.netbeans.api.project.Project;
+import org.netbeans.spi.project.ui.support.ProjectCustomizer;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+import org.openide.filesystems.FileObject;
+import org.openide.util.Exceptions;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle;
+
+/**
+ *
+ * @author normenhansen
+ */
[email protected](projectType = "org-netbeans-modules-java-j2seproject", category = "Application", position = 410)
+public class IosCompositeProvider implements ProjectCustomizer.CompositeCategoryProvider {
+
+    private static final Logger logger = Logger.getLogger(IosCompositeProvider.class.getName());
+    private static final String CAT_MOBILE = "iOSDeployment"; // NOI18N
+    private static ProjectExtensionProperties jwsProps = null;
+    private String[] keyList = new String[]{
+        "application.title",
+        "main.class",
+        "ios.enabled",
+        "ios.version"
+    };
+    private String[] privateKeyList = new String[]{
+        "ios.avian.path",
+        "ios.dev.root"
+    };
+
+    public IosCompositeProvider() {
+    }
+
+    @Override
+    public ProjectCustomizer.Category createCategory(Lookup context) {
+        return ProjectCustomizer.Category.create(CAT_MOBILE,
+                NbBundle.getMessage(IosCompositeProvider.class, "LBL_Category_iOS"), null);
+    }
+
+    @Override
+    public JComponent createComponent(ProjectCustomizer.Category category, Lookup context) {
+        jwsProps = new ProjectExtensionProperties(context.lookup(Project.class), keyList);
+        IosCustomizerPanel panel = new IosCustomizerPanel(jwsProps);
+        category.setStoreListener(new SavePropsListener(jwsProps, context.lookup(Project.class)));
+        category.setOkButtonListener(panel);
+        return panel;
+    }
+
+    private class SavePropsListener implements ActionListener {
+
+        private String extensionName = "ios";
+        private String extensionVersion = "v1.0";
+        private String avianVersion = "v1.1.2";
+        private String[] extensionDependencies = new String[]{"jar", "build-ios"};
+        private ProjectExtensionManager manager = new ProjectExtensionManager(extensionName, extensionVersion, extensionDependencies);
+        private ProjectExtensionProperties properties;
+        private Project project;
+
+        public SavePropsListener(ProjectExtensionProperties props, Project project) {
+            this.properties = props;
+            this.project = project;
+            manager.setAntTaskLibrary("ios-base");
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            if (IosTool.getIosSdkVersions("iPhoneOS").isEmpty()) {
+                showError("No XCode SDK could be found!\nPlease install XCode before proceeding.", null);
+                return;
+            }
+            ProjectExtensionProperties privateProps = new ProjectExtensionProperties(project, privateKeyList, true);
+            manager.setDataZip("nbres:/com/jme3/gde/ios/ios-data.zip");
+            manager.setAntTaskLibrary("pro-guard");
+            ZipExtensionTool zipExt = new ZipExtensionTool(IosTool.class.getPackage().getName(), "avian-openjdk", avianVersion);
+            //zipExt.SUFFIX_LINUX = "mac";
+            //zipExt.SUFFIX_WIN = "mac";
+
+            if ("true".equals(properties.getProperty("ios.enabled"))) {
+                zipExt.install(true);
+                privateProps.setProperty("ios.avian.path", zipExt.getPath());
+                privateProps.setProperty("ios.dev.root", IosTool.getIosDeveloperRootName());
+                manager.loadTargets("nbres:/com/jme3/gde/ios/ios-targets.xml");
+                manager.checkExtension(project);
+                //manager.addRunConfiguration(project, "run-android", "Android Device", "run-android", "run-android", "clean clean-android");
+                FileObject resFolder = project.getProjectDirectory().getFileObject("resources/ios");
+                FileObject projFolder = resFolder.getFileObject("templates/project");
+                FileObject srcFolder = resFolder.getFileObject("templates/src");
+                FileObject propsFile = resFolder.getFileObject("templates/ios.properties");
+                FileObject iosFolder = project.getProjectDirectory().getFileObject("ios");
+                if (iosFolder == null) {
+                    try {
+                        iosFolder = project.getProjectDirectory().createFolder("ios");
+                        projFolder.copy(iosFolder, projFolder.getName(), null);
+                        propsFile.copy(iosFolder, propsFile.getName(), propsFile.getExt());
+                        FileObject newSrcFolder = srcFolder.copy(iosFolder, srcFolder.getName(), null);
+                        replaceHarnessData(newSrcFolder, properties);
+                    } catch (IOException ex) {
+                        showError("Error creating iOS folders", ex);
+                        return;
+                    }
+                }
+                project.getProjectDirectory().refresh();
+            } else {
+                manager.removeExtension(project);
+                if ("true".equals(properties.getProperty("delete.folder"))) {
+                    FileObject iosFolder = project.getProjectDirectory().getFileObject("ios");
+                    if (iosFolder != null) {
+                        try {
+                            iosFolder.delete();
+                        } catch (IOException ex) {
+                            showError("Error deleting iosfolder", ex);
+                            Exceptions.printStackTrace(ex);
+                        }
+                    }
+                }
+                project.getProjectDirectory().refresh();
+            }
+            try {
+                properties.store();
+                privateProps.store();
+            } catch (IOException ioe) {
+                showError("Error storing properties", ioe);
+                Exceptions.printStackTrace(ioe);
+            }
+        }
+
+        private void replaceHarnessData(FileObject newSrcFolder, ProjectExtensionProperties properties) throws IOException {
+            //replace harness data
+            FileObject appHarnessFile = newSrcFolder.getFileObject("JmeAppHarness.java");
+            String text = appHarnessFile.asText();
+            String mainClass = properties.getProperty("main.class");
+            if (text == null || mainClass == null) {
+                logger.log(Level.INFO, "Could not replace harness data in folder {0}, file {4}, text = [{1}], mainClass = [{2}]", new Object[]{newSrcFolder, text, mainClass, appHarnessFile});
+                return;
+            }
+            text = text.replace("${main.class}", mainClass);
+            OutputStream out = appHarnessFile.getOutputStream();
+            BufferedWriter wrt = null;
+            try {
+                wrt = new BufferedWriter(new OutputStreamWriter(out));
+                wrt.write(text, 0, text.length());
+            } catch (IOException ey) {
+                Exceptions.printStackTrace(ey);
+            } finally {
+                if (wrt != null) {
+                    wrt.close();
+                }
+                if (out != null) {
+                    out.close();
+                }
+            }
+        }
+    }
+
+    private void showError(String message, Exception ex) {
+        String mesg = message;
+        if (ex != null) {
+            Exceptions.printStackTrace(ex);
+            mesg = mesg + "\n" + ex.getMessage();
+        }
+        NotifyDescriptor.Confirmation msg = new NotifyDescriptor.Confirmation(
+                mesg,
+                NotifyDescriptor.DEFAULT_OPTION,
+                NotifyDescriptor.ERROR_MESSAGE);
+        DialogDisplayer.getDefault().notify(msg);
+
+    }
+}

+ 143 - 0
jme3-ios/src/com/jme3/gde/ios/panel/IosCustomizerPanel.form

@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Component id="jScrollPane1" max="32767" attributes="0"/>
+                  <Component id="jCheckBox1" max="32767" attributes="0"/>
+                  <Group type="102" alignment="0" attributes="0">
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Component id="jLabel1" min="-2" pref="113" max="-2" attributes="0"/>
+                          <Component id="jLabel2" min="-2" pref="75" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Group type="102" attributes="0">
+                              <Component id="jComboBox1" min="-2" pref="117" max="-2" attributes="0"/>
+                              <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+                          </Group>
+                          <Component id="jTextField1" max="32767" attributes="0"/>
+                      </Group>
+                  </Group>
+                  <Component id="jCheckBox2" alignment="0" pref="500" max="32767" attributes="0"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="1" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jCheckBox1" min="-2" max="-2" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jCheckBox2" min="-2" max="-2" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="jComboBox1" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace type="unrelated" max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jScrollPane1" pref="171" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Component class="javax.swing.JCheckBox" name="jCheckBox1">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="com/jme3/gde/ios/panel/Bundle.properties" key="IosCustomizerPanel.jCheckBox1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JComboBox" name="jComboBox1">
+      <Properties>
+        <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
+          <StringArray count="4">
+            <StringItem index="0" value="Item 1"/>
+            <StringItem index="1" value="Item 2"/>
+            <StringItem index="2" value="Item 3"/>
+            <StringItem index="3" value="Item 4"/>
+          </StringArray>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel1">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="com/jme3/gde/ios/panel/Bundle.properties" key="IosCustomizerPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JCheckBox" name="jCheckBox2">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="com/jme3/gde/ios/panel/Bundle.properties" key="IosCustomizerPanel.jCheckBox2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="jTextField1">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="com/jme3/gde/ios/panel/Bundle.properties" key="IosCustomizerPanel.jTextField1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel2">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="com/jme3/gde/ios/panel/Bundle.properties" key="IosCustomizerPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+      <Properties>
+        <Property name="enabled" type="boolean" value="false"/>
+      </Properties>
+      <AuxValues>
+        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+      </AuxValues>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+      <SubComponents>
+        <Component class="javax.swing.JTextArea" name="jTextArea1">
+          <Properties>
+            <Property name="columns" type="int" value="20"/>
+            <Property name="lineWrap" type="boolean" value="true"/>
+            <Property name="rows" type="int" value="5"/>
+            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="com/jme3/gde/ios/panel/Bundle.properties" key="IosCustomizerPanel.jTextArea1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+            <Property name="wrapStyleWord" type="boolean" value="true"/>
+            <Property name="disabledTextColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+              <Color blue="0" green="0" red="0" type="rgb"/>
+            </Property>
+          </Properties>
+        </Component>
+      </SubComponents>
+    </Container>
+  </SubComponents>
+</Form>

+ 193 - 0
jme3-ios/src/com/jme3/gde/ios/panel/IosCustomizerPanel.java

@@ -0,0 +1,193 @@
+/*
+ *  Copyright (c) 2009-2012 jMonkeyEngine
+ *  All rights reserved.
+ * 
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ * 
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ * 
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * LwjglAppletCustomizerPanel.java
+ *
+ * Created on 11.11.2010, 16:56:53
+ */
+package com.jme3.gde.ios.panel;
+
+import com.jme3.gde.core.j2seproject.ProjectExtensionProperties;
+import com.jme3.gde.ios.IosTool;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.List;
+import org.openide.util.HelpCtx;
+
+/**
+ *
+ * @author normenhansen
+ */
+public class IosCustomizerPanel extends javax.swing.JPanel implements ActionListener {
+
+    private ProjectExtensionProperties properties;
+
+    /**
+     * Creates new form LwjglAppletCustomizerPanel
+     */
+    public IosCustomizerPanel(ProjectExtensionProperties properties) {
+        this.properties = properties;
+        initComponents();
+        HelpCtx.setHelpIDString(this, "jme3.ios");
+        jComboBox1.removeAllItems();
+        List<String> versions = IosTool.getIosSdkVersions("iPhoneOS");
+        for (String string : versions) {
+            jComboBox1.addItem(string);
+        }
+        loadProperties();
+    }
+
+    private void loadProperties() {
+        boolean enabled = "true".equals(properties.getProperty("ios.enabled"));
+        String version = properties.getProperty("ios.version");
+        if (version != null) {
+            setSelected(version);
+        }
+        jCheckBox1.setSelected(enabled);
+    }
+
+    private void saveProperties() {
+        //TODO: check properties
+        properties.setProperty("ios.enabled", "" + jCheckBox1.isSelected());
+        String version = (String) jComboBox1.getSelectedItem();
+        properties.setProperty("ios.version", version);
+        properties.setProperty("delete.folder", "" + jCheckBox2.isSelected());
+    }
+
+    private void setSelected(String name) {
+        for (int i = 0; i < jComboBox1.getItemCount(); i++) {
+            String target = (String) jComboBox1.getItemAt(i);
+            if (target.equals(name)) {
+                jComboBox1.setSelectedIndex(i);
+                return;
+            }
+        }
+    }
+
+    public void actionPerformed(ActionEvent e) {
+        saveProperties();
+    }
+
+    /**
+     * This method is called from within the constructor to initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is always
+     * regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents() {
+
+        jCheckBox1 = new javax.swing.JCheckBox();
+        jComboBox1 = new javax.swing.JComboBox();
+        jLabel1 = new javax.swing.JLabel();
+        jCheckBox2 = new javax.swing.JCheckBox();
+        jTextField1 = new javax.swing.JTextField();
+        jLabel2 = new javax.swing.JLabel();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        jTextArea1 = new javax.swing.JTextArea();
+
+        jCheckBox1.setText(org.openide.util.NbBundle.getMessage(IosCustomizerPanel.class, "IosCustomizerPanel.jCheckBox1.text")); // NOI18N
+
+        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+
+        jLabel1.setText(org.openide.util.NbBundle.getMessage(IosCustomizerPanel.class, "IosCustomizerPanel.jLabel1.text")); // NOI18N
+
+        jCheckBox2.setText(org.openide.util.NbBundle.getMessage(IosCustomizerPanel.class, "IosCustomizerPanel.jCheckBox2.text")); // NOI18N
+
+        jTextField1.setText(org.openide.util.NbBundle.getMessage(IosCustomizerPanel.class, "IosCustomizerPanel.jTextField1.text")); // NOI18N
+
+        jLabel2.setText(org.openide.util.NbBundle.getMessage(IosCustomizerPanel.class, "IosCustomizerPanel.jLabel2.text")); // NOI18N
+
+        jScrollPane1.setEnabled(false);
+
+        jTextArea1.setColumns(20);
+        jTextArea1.setLineWrap(true);
+        jTextArea1.setRows(5);
+        jTextArea1.setText(org.openide.util.NbBundle.getMessage(IosCustomizerPanel.class, "IosCustomizerPanel.jTextArea1.text")); // NOI18N
+        jTextArea1.setWrapStyleWord(true);
+        jTextArea1.setDisabledTextColor(new java.awt.Color(0, 0, 0));
+        jScrollPane1.setViewportView(jTextArea1);
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+        this.setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(jScrollPane1)
+                    .addComponent(jCheckBox1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addGroup(layout.createSequentialGroup()
+                                .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                .addGap(0, 0, Short.MAX_VALUE))
+                            .addComponent(jTextField1)))
+                    .addComponent(jCheckBox2, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(jCheckBox1)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(jCheckBox2)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(jLabel1))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(jLabel2)
+                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE)
+                .addContainerGap())
+        );
+    }// </editor-fold>//GEN-END:initComponents
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JCheckBox jCheckBox1;
+    private javax.swing.JCheckBox jCheckBox2;
+    private javax.swing.JComboBox jComboBox1;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JLabel jLabel2;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JTextArea jTextArea1;
+    private javax.swing.JTextField jTextField1;
+    // End of variables declaration//GEN-END:variables
+}

+ 1 - 1
license-jme.txt

@@ -1,4 +1,4 @@
-Copyright (c) 2003-2015 jMonkeyEngine
+Copyright (c) 2003-2016 jMonkeyEngine
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use in source and binary forms, with or without
 Redistribution and use in source and binary forms, with or without

+ 37 - 2
nbproject/project.properties

@@ -1,4 +1,4 @@
-#Mon, 14 Mar 2016 11:35:24 +0100
+#Fri, 25 Mar 2016 09:25:21 +0100
 app.icon=branding/core/core.jar/org/netbeans/core/startup/frame48.gif
 app.icon=branding/core/core.jar/org/netbeans/core/startup/frame48.gif
 #same as ${branding.token}
 #same as ${branding.token}
 app.name=jmonkeyplatform
 app.name=jmonkeyplatform
@@ -19,7 +19,41 @@ auxiliary.org-netbeans-modules-apisupport-installer.os-macosx=true
 auxiliary.org-netbeans-modules-apisupport-installer.os-solaris=false
 auxiliary.org-netbeans-modules-apisupport-installer.os-solaris=false
 auxiliary.org-netbeans-modules-apisupport-installer.os-windows=true
 auxiliary.org-netbeans-modules-apisupport-installer.os-windows=true
 auxiliary.org-netbeans-modules-apisupport-installer.pack200-enabled=true
 auxiliary.org-netbeans-modules-apisupport-installer.pack200-enabled=true
-modules=${project.com.jme3.gde.core}\:${project.com.jme3.gde.core.baselibs}\:${project.com.jme3.gde.core.libraries}\:${project.com.jme3.gde.templates}\:${project.com.jme3.gde.project.baselibs}\:${project.com.jme3.gde.project.libraries}\:${project.com.jme3.gde.tests}\:${project.com.jme3.gde.project.testdata}\:${project.com.jme3.gde.ogrexml}\:${project.com.jme3.gde.scenecomposer}\:${project.com.jme3.gde.materials}\:${project.com.jme3.gde.gui}\:${project.com.jme3.gde.ogretools}\:${project.com.jme3.gde.codepalette}\:${project.com.jme3.gde.textureeditor}\:${project.com.jme3.gde.core.updatecenters}\:${project.com.jme3.gde.wavefront}\:${project.com.jme3.gde.terraineditor}\:${project.com.jme3.gde.assetpack}\:${project.com.jme3.gde.modelimporter}\:${project.com.jme3.gde.lwjgl.applet}\:${project.com.jme3.gde.desktop.executables}\:${project.com.jme3.gde.cinematics}\:${project.com.jme3.gde.vehiclecreator}\:${project.com.jme3.gde.welcome}\:${project.com.jme3.gde.codecheck}\:${project.com.jme3.gde.obfuscate}\:${project.com.jme3.gde.blender}\:${project.com.jme3.gde.angelfont}\:${project.com.jme3.gde.android}\:${project.com.jme3.gde.nmgen}\:${project.com.jme3.gde.docs}\:${project.org.jme3.netbeans.plaf.darkmonkey}
+modules=\
+    ${project.com.jme3.gde.core}:\
+    ${project.com.jme3.gde.core.baselibs}:\
+    ${project.com.jme3.gde.core.libraries}:\
+    ${project.com.jme3.gde.templates}:\
+    ${project.com.jme3.gde.project.baselibs}:\
+    ${project.com.jme3.gde.project.libraries}:\
+    ${project.com.jme3.gde.tests}:\
+    ${project.com.jme3.gde.project.testdata}:\
+    ${project.com.jme3.gde.ogrexml}:\
+    ${project.com.jme3.gde.scenecomposer}:\
+    ${project.com.jme3.gde.materials}:\
+    ${project.com.jme3.gde.gui}:\
+    ${project.com.jme3.gde.ogretools}:\
+    ${project.com.jme3.gde.codepalette}:\
+    ${project.com.jme3.gde.textureeditor}:\
+    ${project.com.jme3.gde.core.updatecenters}:\
+    ${project.com.jme3.gde.wavefront}:\
+    ${project.com.jme3.gde.terraineditor}:\
+    ${project.com.jme3.gde.assetpack}:\
+    ${project.com.jme3.gde.modelimporter}:\
+    ${project.com.jme3.gde.lwjgl.applet}:\
+    ${project.com.jme3.gde.desktop.executables}:\
+    ${project.com.jme3.gde.cinematics}:\
+    ${project.com.jme3.gde.vehiclecreator}:\
+    ${project.com.jme3.gde.welcome}:\
+    ${project.com.jme3.gde.codecheck}:\
+    ${project.com.jme3.gde.obfuscate}:\
+    ${project.com.jme3.gde.blender}:\
+    ${project.com.jme3.gde.angelfont}:\
+    ${project.com.jme3.gde.android}:\
+    ${project.com.jme3.gde.nmgen}:\
+    ${project.com.jme3.gde.docs}:\
+    ${project.org.jme3.netbeans.plaf.darkmonkey}:\
+    ${project.com.jme3.gde.ios}
 project.com.jme3.gde.android=jme3-android
 project.com.jme3.gde.android=jme3-android
 project.com.jme3.gde.angelfont=jme3-angelfont
 project.com.jme3.gde.angelfont=jme3-angelfont
 project.com.jme3.gde.blender=jme3-blender
 project.com.jme3.gde.blender=jme3-blender
@@ -35,6 +69,7 @@ project.com.jme3.gde.core.baselibs=jme3-core-baselibs
 project.com.jme3.gde.core.libraries=jme3-core-libraries
 project.com.jme3.gde.core.libraries=jme3-core-libraries
 project.com.jme3.gde.core.updatecenters=jme3-core-updatecenters
 project.com.jme3.gde.core.updatecenters=jme3-core-updatecenters
 project.com.jme3.gde.gui=jme3-gui
 project.com.jme3.gde.gui=jme3-gui
+project.com.jme3.gde.ios=jme3-ios
 project.com.jme3.gde.lwjgl.applet=jme3-lwjgl-applet
 project.com.jme3.gde.lwjgl.applet=jme3-lwjgl-applet
 project.com.jme3.gde.materials=jme3-materialeditor
 project.com.jme3.gde.materials=jme3-materialeditor
 project.com.jme3.gde.modelimporter=jme3-model-importer
 project.com.jme3.gde.modelimporter=jme3-model-importer