Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jme3-ios/ios-data/templates/ios.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ios.proguard.options=-keep public class com.jme3.system.ios.*{public *;} \
-keep public class de.lessvoid.nifty.loaderv2.types.** { public *;} \
-keep public class de.lessvoid.nifty.controls.** { public *; } \
-keep public class de.lessvoid.nifty.input.** { public *; } \
-keep public class de.lessvoid.nifty.effects.impl.** { public *;}
-keep public class de.lessvoid.nifty.effects.impl.** { public *;} \
-keepclassmembers class com.jme3.audio.plugins.NativeVorbisFile{public *;} \
-keep public class * implements javax.xml.parsers.SAXParserFactory{public *;} \
-keep public class com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
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 */; };
BBE3F3AD25E54070009CA0E9 /* Dummy.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BBE3F3AC25E54070009CA0E9 /* Dummy.storyboard */; };
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 */; };
Expand All @@ -40,6 +41,7 @@
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>"; };
BBE3F3AC25E54070009CA0E9 /* Dummy.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Dummy.storyboard; 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; };
Expand Down Expand Up @@ -101,6 +103,7 @@
08914C1A142A826B00991C80 /* iPhone */,
08914C21142A826B00991C80 /* iPad */,
08914C0F142A826B00991C80 /* Supporting Files */,
BBE3F3AC25E54070009CA0E9 /* Dummy.storyboard */,
);
path = "jme-ios";
sourceTree = "<group>";
Expand Down Expand Up @@ -194,6 +197,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BBE3F3AD25E54070009CA0E9 /* Dummy.storyboard in Resources */,
E9E6261018A052130084FC12 /* logging.properties in Resources */,
08914C13142A826B00991C80 /* InfoPlist.strings in Resources */,
08914C20142A826B00991C80 /* MainWindow_iPhone.xib in Resources */,
Expand Down Expand Up @@ -292,7 +296,7 @@
/System/Library/Frameworks/JavaVM.framework/Headers,
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/JavaVM.framework/Headers/,
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"-filelist",
Expand Down Expand Up @@ -350,7 +354,7 @@
/System/Library/Frameworks/JavaVM.framework/Headers,
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/JavaVM.framework/Headers/,
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
OTHER_LDFLAGS = (
"-filelist",
Expand Down Expand Up @@ -386,7 +390,8 @@
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/JavaVM.framework/Headers/,
);
INFOPLIST_FILE = "jme-ios/jme-ios-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
OTHER_CODE_SIGN_FLAGS = "--deep";
OTHER_LDFLAGS = (
"-filelist",
"../../build/ios-arm/libs.list",
Expand Down Expand Up @@ -422,7 +427,7 @@
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/JavaVM.framework/Headers/,
);
INFOPLIST_FILE = "jme-ios/jme-ios-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
OTHER_LDFLAGS = (
"-filelist",
"../../build/ios-arm/libs.list",
Expand Down
27 changes: 27 additions & 0 deletions jme3-ios/ios-data/templates/project/jme-ios/Dummy.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="D10-0T-wYE">
<objects>
<viewController id="hFc-qA-Ss9" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="0DT-pd-vHB">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="Sxt-UA-qxL"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="abh-6n-3aV" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-172" y="-209"/>
</scene>
</scenes>
</document>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import <UIKit/UIKit.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES3/gl.h>
#import <GLKit/GLKit.h>
#define __LP64__ 1
#include <jni.h>
Expand Down
5 changes: 4 additions & 1 deletion jme3-ios/ios-data/templates/project/jme-ios/jmeAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
/**
* GLES Context initialization
**/
_ctx = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
_ctx = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
if (_ctx == nil) {
_ctx = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
}
_glview.context = _ctx;
_glview.drawableDepthFormat = GLKViewDrawableDepthFormat24;
_glview.delegate = self;
Expand Down
40 changes: 25 additions & 15 deletions jme3-ios/ios-data/templates/src/JmeAppHarness.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import com.jme3.system.ios.IosHarness;
import com.jme3.input.ios.IosInputHandler;
import com.jme3.math.Vector2f;
import com.jme3.renderer.opengl.GLRenderer;
import com.jme3.system.JmeContext;
import com.jme3.system.AppSettings;
Expand All @@ -18,6 +19,7 @@ public class JmeAppHarness extends IosHarness{
protected GLRenderer renderer;
protected IosInputHandler input;
protected boolean autoFlush = true;
protected Vector2f resizePending = null;


/**
Expand Down Expand Up @@ -62,17 +64,21 @@ public void appUpdate() {
@Override
public void appDraw() {
logger.log(Level.FINE, "JmeAppHarness appDraw");
if (renderer == null) {
JmeContext iosContext = app.getContext();
renderer = (GLRenderer)iosContext.getRenderer();
renderer.initialize();
input = (IosInputHandler)iosContext.getTouchInput();
input.initialize();
} else {
app.update();
if (renderer == null) {
JmeContext iosContext = app.getContext();
renderer = (GLRenderer)iosContext.getRenderer();
renderer.initialize();
input = (IosInputHandler)iosContext.getTouchInput();
input.initialize();
} else {
if(resizePending != null) {
appReshape((int)resizePending.x, (int)resizePending.y);
resizePending = null;
}
app.update();
if (autoFlush) {
renderer.postFrame();
}
renderer.postFrame();
}
}
}

Expand All @@ -82,11 +88,15 @@ public void appReshape(int width, int height) {
AppSettings settings = app.getContext().getSettings();
settings.setResolution(width, height);
if (renderer != null) {
app.reshape(width, height);
}
if (input != null) {
input.loadSettings(settings);
}
app.reshape(width, height);
resizePending = null;
} else {
resizePending = new Vector2f(width, height);
}

if (input != null) {
input.loadSettings(settings);
}
}

public void injectTouchBegin(int pointerId, long time, float x, float y) {
Expand Down
Loading