diff --git a/.github/workflows/fix-formatting.yml b/.github/workflows/fix-formatting.yml
index b73191d53cc..9fa5b450832 100644
--- a/.github/workflows/fix-formatting.yml
+++ b/.github/workflows/fix-formatting.yml
@@ -23,13 +23,21 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- - name: Apply formatter
+ - name: Generate MobiVM MetalANGLE backend
+ run: ./gradlew :backends:gdx-backend-robovm-metalangle:generate :backends:gdx-backend-robovm-metalangle:spotlessApply
+ - name: Commit generation changes
+ run: |
+ git config --local user.email "action@github.com"
+ git config --local user.name "GitHub Action"
+ git add backends/gdx-backend-robovm-metalangle/src
+ git commit -m "Generate MobiVM MetalANGLE backend" -a
+ continue-on-error: true
+ - name: Apply formater
run: ./gradlew spotlessApply
- name: Commit formatting changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- git add .
git commit -m "Apply formatter" -a
continue-on-error: true
- name: Push formatting changes
diff --git a/.gitignore b/.gitignore
index 6a647141a2f..016a0f151ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -69,6 +69,7 @@ libgdx-*.zip.MD5
#the LWJGL3 libs are pulled via fetch.xml
/backends/gdx-backend-lwjgl3/libs/lwjgl*.jar
+/backends/gdx-backend-robovm-metalangle/res/META-INF/robovm/ios/libs
#ensure gdx-setup.jar works properly
!/extensions/gdx-setup/src/com/badlogic/gdx/setup/resources/gwt/war
diff --git a/CHANGES b/CHANGES
index 58421c3bf21..1984d045b57 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+[1.11.1]
+- iOS: Add new MobiVM MetalANGLE backend
+
[1.11.0]
- [BREAKING CHANGE] iOS: Increased min supported iOS version to 9.0. Update your Info.plist file if necessary.
- [BREAKING CHANGE] Removed Maven and Ant build systems. libGDX is now solely built with Gradle. See https://libgdx.com/dev/from-source/ for updated build instructions.
diff --git a/THIRDPARTY b/THIRDPARTY
new file mode 100644
index 00000000000..8bbf42373bc
--- /dev/null
+++ b/THIRDPARTY
@@ -0,0 +1,33 @@
+ANGLE/MetalANGLE:
+ // Copyright 2018 The ANGLE Project Authors.
+ // 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 TransGaming Inc., Google Inc., 3DLabs Inc.
+ // Ltd., nor the names of their 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.
\ No newline at end of file
diff --git a/backends/gdx-backend-robovm-metalangle/build.gradle b/backends/gdx-backend-robovm-metalangle/build.gradle
new file mode 100644
index 00000000000..a89c968544a
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/build.gradle
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright 2011 See AUTHORS file.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+import org.gradle.internal.os.OperatingSystem
+
+sourceSets {
+ generator {
+ java {
+ srcDir 'generator'
+ }
+ resources {
+ srcDir 'generator'
+ }
+ }
+ main {
+ java {
+ srcDir 'src'
+ }
+ resources {
+ srcDir 'res'
+ }
+ }
+}
+configurations {
+ generatorCompile.extendsFrom testCompile
+ generatorRuntime.extendsFrom testRuntime
+}
+
+configurations { generator }
+
+dependencies {
+ api libraries.robovm
+ generatorImplementation 'com.github.javaparser:javaparser-core:3.24.2'
+}
+
+task generate(type: JavaExec) {
+ dependsOn configurations.generator
+
+ main = 'JavaCodeGenerator'
+ classpath = sourceSets.generator.runtimeClasspath
+
+ inputs.dir '../gdx-backend-robovm/src/'
+ outputs.dir 'src/'
+}
+
+task fetchMetalANGLE(type: Download) {
+ doFirst {
+ file("build/tmp").mkdirs();
+ }
+ src 'https://github.com/kakashidinho/metalangle/releases/download/gles3-0.0.7/MetalANGLE.framework.ios.zip'
+ dest 'build/tmp/MetalANGLE.framework.ios.zip'
+ onlyIfModified true
+ useETag "all"
+}
+
+task fetchMetalANGLESimulator(type: Download) {
+ doFirst {
+ file("build/tmp").mkdirs();
+ }
+ src 'https://github.com/kakashidinho/metalangle/releases/download/gles3-0.0.7/MetalANGLE.framework.ios.simulator.zip'
+ dest 'build/tmp/MetalANGLE.framework.ios.simulator.zip'
+ onlyIfModified true
+ useETag "all"
+}
+
+task verifyMetalANGLE(dependsOn: fetchMetalANGLE, type: Verify) {
+ src 'build/tmp/MetalANGLE.framework.ios.zip'
+ algorithm 'SHA-256'
+ checksum '66fcf9eed2ede9e5725bf64e5b3169e0f39d1a515fe425447354c41968fc7999'
+}
+
+task verifyMetalANGLESimulator(dependsOn: fetchMetalANGLESimulator, type: Verify) {
+ src 'build/tmp/MetalANGLE.framework.ios.simulator.zip'
+ algorithm 'SHA-256'
+ checksum 'e9aa526d2f19c57e1efbae4ec04d76701da4cf596bf8c6fb6ef6c507dbc2fdc4'
+}
+
+task extractMetalANGLE(dependsOn: verifyMetalANGLE, type: Copy) {
+ doFirst {
+ file("build/tmp/real").mkdirs();
+ }
+ from zipTree('build/tmp/MetalANGLE.framework.ios.zip')
+ into 'build/tmp/real'
+}
+
+task extractMetalANGLESimulator(dependsOn: verifyMetalANGLESimulator, type: Copy) {
+ doFirst {
+ file("build/tmp/sim").mkdirs();
+ }
+ from zipTree('build/tmp/MetalANGLE.framework.ios.simulator.zip')
+ into 'build/tmp/sim'
+}
+
+task buildMetalANGLE(dependsOn: [
+ extractMetalANGLE,
+ extractMetalANGLESimulator
+], type: Exec) {
+ doFirst {
+ file("res/META-INF/robovm/ios/libs").mkdirs();
+ }
+ commandLine 'xcodebuild', '-create-xcframework', '-framework', 'build/tmp/real/MetalANGLE.framework', '-framework', 'build/tmp/sim/MetalANGLE.framework', '-output', 'res/META-INF/robovm/ios/libs/MetalANGLE.xcframework'
+ standardOutput = new ByteArrayOutputStream()
+ ext.output = {
+ return standardOutput.toString()
+ }
+
+ inputs.dir 'build/tmp/real/MetalANGLE.framework'
+ inputs.dir 'build/tmp/sim/MetalANGLE.framework'
+ outputs.dir 'res/META-INF/robovm/ios/libs/MetalANGLE.xcframework'
+}
+
+task jnigenBuildIOS(dependsOn: buildMetalANGLE) {
+}
+
+task jnigenBuild() {
+}
+
+//Dummy task to make compatible with publish
+task jnigen() {
+}
+
+if(OperatingSystem.current() == OperatingSystem.MAC_OS) {
+ jnigenBuild.dependsOn jnigenBuildIOS
+}
\ No newline at end of file
diff --git a/backends/gdx-backend-robovm-metalangle/generator/JavaCodeGenerator.java b/backends/gdx-backend-robovm-metalangle/generator/JavaCodeGenerator.java
new file mode 100644
index 00000000000..84e8b7e806e
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/generator/JavaCodeGenerator.java
@@ -0,0 +1,142 @@
+import java.io.File;
+import java.io.FileWriter;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import com.github.javaparser.JavaParser;
+import com.github.javaparser.StaticJavaParser;
+import com.github.javaparser.ast.CompilationUnit;
+import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
+import com.github.javaparser.ast.body.MethodDeclaration;
+import com.github.javaparser.ast.expr.Name;
+import com.github.javaparser.ast.expr.SimpleName;
+import com.github.javaparser.ast.type.ClassOrInterfaceType;
+import com.github.javaparser.ast.visitor.ModifierVisitor;
+import com.github.javaparser.ast.visitor.Visitable;
+import com.github.javaparser.printer.lexicalpreservation.LexicalPreservingPrinter;
+
+public class JavaCodeGenerator {
+ /** This would allow us to keep exact formatting, but it's broken for FieldDeclarations for some reason. Potential related to
+ * https://github.com/javaparser/javaparser/issues/1601 */
+ private static boolean LEXICAL_PRESERVING_PRINTER = false;
+
+ private static File BASE_PROJECT_SRC = new File("../gdx-backend-robovm/src");
+
+ private static Map IMPORT_REPLACEMENTS = new HashMap<>();
+ private static Map CLASS_REPLACEMENTS = new HashMap<>();
+
+ static {
+ IMPORT_REPLACEMENTS.put("org.robovm.apple.opengles.EAGLContext",
+ "com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLContext");
+ IMPORT_REPLACEMENTS.put("org.robovm.apple.opengles.EAGLRenderingAPI",
+ "com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLRenderingAPI");
+
+ IMPORT_REPLACEMENTS.put("org.robovm.apple.glkit.GLKView",
+ "com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLKView");
+ IMPORT_REPLACEMENTS.put("org.robovm.apple.glkit.GLKViewController",
+ "com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLKViewController");
+ IMPORT_REPLACEMENTS.put("org.robovm.apple.glkit.GLKViewControllerDelegate",
+ "com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLKViewControllerDelegate");
+ IMPORT_REPLACEMENTS.put("org.robovm.apple.glkit.GLKViewDelegate",
+ "com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLKViewDelegate");
+ IMPORT_REPLACEMENTS.put("org.robovm.apple.glkit.GLKViewDrawableColorFormat",
+ "com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLDrawableColorFormat");
+ IMPORT_REPLACEMENTS.put("org.robovm.apple.glkit.GLKViewDrawableDepthFormat",
+ "com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLDrawableDepthFormat");
+ IMPORT_REPLACEMENTS.put("org.robovm.apple.glkit.GLKViewDrawableMultisample",
+ "com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLDrawableMultisample");
+ IMPORT_REPLACEMENTS.put("org.robovm.apple.glkit.GLKViewDrawableStencilFormat",
+ "com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLDrawableStencilFormat");
+
+ for (Entry e : IMPORT_REPLACEMENTS.entrySet()) {
+ String o = e.getKey().substring(e.getKey().lastIndexOf('.') + 1);
+ String n = e.getValue().substring(e.getValue().lastIndexOf('.') + 1);
+ CLASS_REPLACEMENTS.put(o, n);
+ }
+ }
+
+ public static void main (String[] args) throws Exception {
+ search(BASE_PROJECT_SRC);
+ }
+
+ private static void search (File f) throws Exception {
+ if (f.isDirectory()) {
+ for (File child : f.listFiles())
+ search(child);
+ return;
+ }
+
+ if (!f.getName().endsWith(".java")) {
+ return;
+ }
+
+ parse(f);
+ }
+
+ private static void parse (File f) throws Exception {
+ CompilationUnit cu = StaticJavaParser.parse(f);
+
+ if (LEXICAL_PRESERVING_PRINTER) cu = LexicalPreservingPrinter.setup(cu);
+
+ cu.setBlockComment("DO NOT EDIT THIS FILE - it is machine generated");
+
+ final JavaParser javaParser = new JavaParser();
+
+ ModifierVisitor
+ *
+ * The methods will be invoked on the UI thread.
+ *
+ * @author mzechner */
+public interface IOSViewControllerListener {
+
+ /** Called when the {@link IOSApplication} root ViewController has appeared */
+ public void viewDidAppear (boolean animated);
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLContext.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLContext.java
new file mode 100644
index 00000000000..01399613089
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLContext.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.Method;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.objc.annotation.Property;
+import org.robovm.rt.bro.annotation.Pointer;
+import org.robovm.rt.bro.ptr.Ptr;
+import org.robovm.rt.bro.ptr.VoidPtr;
+/**/
+
+/**/
+
+/**/
+/**/@NativeClass
+/* */
+/* */public/* */ class /* */ MGLContext/* */
+ extends /* */NSObject/* */
+/* *//* */ {
+
+ /* */public static class MGLContextPtr extends Ptr {
+ }
+
+ /* */
+ /* */static {
+ ObjCRuntime.bind(MGLContext.class);
+ }/* */
+ /* *//* */
+ /* */
+
+ protected MGLContext () {
+ }
+
+ protected MGLContext (Handle h, long handle) {
+ super(h, handle);
+ }
+
+ protected MGLContext (SkipInit skipInit) {
+ super(skipInit);
+ }
+
+ @Method(selector = "initWithAPI:")
+ public MGLContext (MGLRenderingAPI api) {
+ super((SkipInit)null);
+ initObject(initWithAPI(api));
+ }
+
+ @Method(selector = "initWithAPI:sharegroup:")
+ public MGLContext (MGLRenderingAPI api, MGLSharegroup sharegroup) {
+ super((SkipInit)null);
+ initObject(initWithAPISharegroup(api, sharegroup));
+ }
+
+ /* */
+ /* */
+ @Property(selector = "API")
+ public native MGLRenderingAPI getAPI ();
+
+ @Property(selector = "sharegroup")
+ public native MGLSharegroup getSharegroup ();
+
+ @Property(selector = "eglDisplay")
+ public native VoidPtr getEglDisplay ();
+
+ /* */
+ /* *//* */
+ /* */
+ @Method(selector = "initWithAPI:")
+ protected native @Pointer long initWithAPI (MGLRenderingAPI api);
+
+ @Method(selector = "initWithAPI:sharegroup:")
+ protected native @Pointer long initWithAPISharegroup (MGLRenderingAPI api, MGLSharegroup sharegroup);
+
+ @Method(selector = "present:")
+ public native boolean present (MGLLayer layer);
+
+ @Method(selector = "currentContext")
+ public static native MGLContext currentContext ();
+
+ @Method(selector = "currentLayer")
+ public static native MGLLayer currentLayer ();
+
+ @Method(selector = "setCurrentContext:")
+ public static native boolean setCurrentContext (MGLContext context);
+
+ @Method(selector = "setCurrentContext:forLayer:")
+ public static native boolean setCurrentContextForLayer (MGLContext context, MGLLayer layer);
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableColorFormat.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableColorFormat.java
new file mode 100644
index 00000000000..b228e5c5240
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableColorFormat.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.rt.bro.ValuedEnum;
+/**/
+
+/**/
+
+/**/
+/**//**/
+public enum /* */MGLDrawableColorFormat/* */ implements ValuedEnum {
+ /* */
+ RGBA8888(32L), SRGBA8888(-32L), RGB565(16L);
+ /* */
+
+ /* */
+ /* */
+ /* *//* */
+ /* *//* */
+
+ private final long n;
+
+ private /* */ MGLDrawableColorFormat/* */ (long n) {
+ this.n = n;
+ }
+
+ public long value () {
+ return n;
+ }
+
+ public static /* */MGLDrawableColorFormat/* */ valueOf (long n) {
+ for (/* */MGLDrawableColorFormat/* */ v : values()) {
+ if (v.n == n) {
+ return v;
+ }
+ }
+ throw new IllegalArgumentException(
+ "No constant with value " + n + " found in " + /* */MGLDrawableColorFormat/* */.class.getName());
+ }
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableDepthFormat.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableDepthFormat.java
new file mode 100644
index 00000000000..819711bc35d
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableDepthFormat.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.rt.bro.ValuedEnum;
+/**/
+
+/**/
+
+/**/
+/**//**/
+public enum /* */MGLDrawableDepthFormat/* */ implements ValuedEnum {
+ /* */
+ None(0L), _16(16L), _24(24L);
+ /* */
+
+ /* */
+ /* */
+ /* *//* */
+ /* *//* */
+
+ private final long n;
+
+ private /* */ MGLDrawableDepthFormat/* */ (long n) {
+ this.n = n;
+ }
+
+ public long value () {
+ return n;
+ }
+
+ public static /* */MGLDrawableDepthFormat/* */ valueOf (long n) {
+ for (/* */MGLDrawableDepthFormat/* */ v : values()) {
+ if (v.n == n) {
+ return v;
+ }
+ }
+ throw new IllegalArgumentException(
+ "No constant with value " + n + " found in " + /* */MGLDrawableDepthFormat/* */.class.getName());
+ }
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableMultisample.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableMultisample.java
new file mode 100644
index 00000000000..7bf3d6fe1be
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableMultisample.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.rt.bro.ValuedEnum;
+/**/
+
+/**/
+
+/**/
+/**//**/
+public enum /* */MGLDrawableMultisample/* */ implements ValuedEnum {
+ /* */
+ None(0L), _4X(4L);
+ /* */
+
+ /* */
+ /* */
+ /* *//* */
+ /* *//* */
+
+ private final long n;
+
+ private /* */ MGLDrawableMultisample/* */ (long n) {
+ this.n = n;
+ }
+
+ public long value () {
+ return n;
+ }
+
+ public static /* */MGLDrawableMultisample/* */ valueOf (long n) {
+ for (/* */MGLDrawableMultisample/* */ v : values()) {
+ if (v.n == n) {
+ return v;
+ }
+ }
+ throw new IllegalArgumentException(
+ "No constant with value " + n + " found in " + /* */MGLDrawableMultisample/* */.class.getName());
+ }
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableStencilFormat.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableStencilFormat.java
new file mode 100644
index 00000000000..b33653a94f1
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLDrawableStencilFormat.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.rt.bro.ValuedEnum;
+/**/
+
+/**/
+
+/**/
+/**//**/
+public enum /* */MGLDrawableStencilFormat/* */ implements ValuedEnum {
+ /* */
+ None(0L), _8(8L);
+ /* */
+
+ /* */
+ /* */
+ /* *//* */
+ /* *//* */
+
+ private final long n;
+
+ private /* */ MGLDrawableStencilFormat/* */ (long n) {
+ this.n = n;
+ }
+
+ public long value () {
+ return n;
+ }
+
+ public static /* */MGLDrawableStencilFormat/* */ valueOf (long n) {
+ for (/* */MGLDrawableStencilFormat/* */ v : values()) {
+ if (v.n == n) {
+ return v;
+ }
+ }
+ throw new IllegalArgumentException(
+ "No constant with value " + n + " found in " + /* */MGLDrawableStencilFormat/* */.class.getName());
+ }
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKView.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKView.java
new file mode 100644
index 00000000000..315ced8f18b
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKView.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.apple.coregraphics.CGRect;
+import org.robovm.apple.coregraphics.CGSize;
+import org.robovm.apple.uikit.UIImage;
+import org.robovm.apple.uikit.UIView;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.Method;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.objc.annotation.Property;
+import org.robovm.rt.bro.annotation.ByVal;
+import org.robovm.rt.bro.annotation.MachineSizedSInt;
+import org.robovm.rt.bro.annotation.Pointer;
+import org.robovm.rt.bro.ptr.Ptr;
+/**/
+
+/**/
+
+/**/
+/**/@NativeClass
+/* */
+/* */public/* */ class /* */ MGLKView/* */
+ extends /* */UIView/* */
+/* *//* */ {
+
+ /* */public static class MGLKViewPtr extends Ptr {
+ }
+
+ /* */
+ /* */static {
+ ObjCRuntime.bind(MGLKView.class);
+ }/* */
+ /* *//* */
+ /* */
+
+ protected MGLKView () {
+ }
+
+ protected MGLKView (Handle h, long handle) {
+ super(h, handle);
+ }
+
+ protected MGLKView (SkipInit skipInit) {
+ super(skipInit);
+ }
+
+ @Method(selector = "initWithFrame:context:")
+ public MGLKView (@ByVal CGRect frame, MGLContext context) {
+ super((SkipInit)null);
+ initObject(initWithFrameContext(frame, context));
+ }
+
+ /* */
+ /* */
+ @Property(selector = "context")
+ public native MGLContext getContext ();
+
+ @Property(selector = "setContext:")
+ public native void setContext (MGLContext v);
+
+ @Property(selector = "delegate")
+ public native MGLKViewDelegate getDelegate ();
+
+ @Property(selector = "setDelegate:", strongRef = true)
+ public native void setDelegate (MGLKViewDelegate v);
+
+ @Property(selector = "retainedBacking")
+ public native boolean isRetainedBacking ();
+
+ @Property(selector = "setRetainedBacking:")
+ public native void setRetainedBacking (boolean v);
+
+ @Property(selector = "drawableColorFormat")
+ public native MGLDrawableColorFormat getDrawableColorFormat ();
+
+ @Property(selector = "setDrawableColorFormat:")
+ public native void setDrawableColorFormat (MGLDrawableColorFormat v);
+
+ @Property(selector = "drawableDepthFormat")
+ public native MGLDrawableDepthFormat getDrawableDepthFormat ();
+
+ @Property(selector = "setDrawableDepthFormat:")
+ public native void setDrawableDepthFormat (MGLDrawableDepthFormat v);
+
+ @Property(selector = "drawableStencilFormat")
+ public native MGLDrawableStencilFormat getDrawableStencilFormat ();
+
+ @Property(selector = "setDrawableStencilFormat:")
+ public native void setDrawableStencilFormat (MGLDrawableStencilFormat v);
+
+ @Property(selector = "drawableMultisample")
+ public native MGLDrawableMultisample getDrawableMultisample ();
+
+ @Property(selector = "setDrawableMultisample:")
+ public native void setDrawableMultisample (MGLDrawableMultisample v);
+
+ @Property(selector = "glLayer")
+ public native MGLLayer getGlLayer ();
+
+ @Property(selector = "drawableSize")
+ public native @ByVal CGSize getDrawableSize ();
+
+ @Property(selector = "drawableWidth")
+ public native @MachineSizedSInt long getDrawableWidth ();
+
+ @Property(selector = "drawableHeight")
+ public native @MachineSizedSInt long getDrawableHeight ();
+
+ @Property(selector = "defaultOpenGLFrameBufferID")
+ public native int getDefaultOpenGLFrameBufferID ();
+
+ @Property(selector = "enableSetNeedsDisplay")
+ public native boolean isEnableSetNeedsDisplay ();
+
+ @Property(selector = "setEnableSetNeedsDisplay:")
+ public native void setEnableSetNeedsDisplay (boolean v);
+
+ @Property(selector = "snapshot")
+ public native UIImage getSnapshot ();
+
+ /* */
+ /* *//* */
+ /* */
+ @Method(selector = "initWithFrame:context:")
+ protected native @Pointer long initWithFrameContext (@ByVal CGRect frame, MGLContext context);
+
+ @Method(selector = "display")
+ public native void display ();
+
+ @Method(selector = "bindDrawable")
+ public native void bindDrawable ();
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewController.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewController.java
new file mode 100644
index 00000000000..cf0e4ffc4d1
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewController.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.apple.coregraphics.CGRect;
+import org.robovm.apple.uikit.UIViewController;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.Method;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.objc.annotation.Property;
+import org.robovm.rt.bro.annotation.ByVal;
+import org.robovm.rt.bro.annotation.MachineSizedSInt;
+import org.robovm.rt.bro.ptr.Ptr;
+/**/
+
+/**/
+
+/**/
+/**/@NativeClass
+/* */
+/* */public/* */ class /* */ MGLKViewController/* */
+ extends /* */UIViewController/* */
+ /* */ implements MGLKViewDelegate/* */ {
+
+ /* */public static class MGLKViewControllerPtr extends Ptr {
+ }
+
+ /* */
+ /* */static {
+ ObjCRuntime.bind(MGLKViewController.class);
+ }/* */
+ /* *//* */
+ /* */
+
+ protected MGLKViewController () {
+ }
+
+ protected MGLKViewController (Handle h, long handle) {
+ super(h, handle);
+ }
+
+ protected MGLKViewController (SkipInit skipInit) {
+ super(skipInit);
+ }
+
+ /* */
+ /* */
+ @Property(selector = "delegate")
+ public native MGLKViewControllerDelegate getDelegate ();
+
+ @Property(selector = "setDelegate:", strongRef = true)
+ public native void setDelegate (MGLKViewControllerDelegate v);
+
+ @Property(selector = "preferredFramesPerSecond")
+ public native @MachineSizedSInt long getPreferredFramesPerSecond ();
+
+ @Property(selector = "setPreferredFramesPerSecond:")
+ public native void setPreferredFramesPerSecond (@MachineSizedSInt long v);
+
+ @Property(selector = "framesDisplayed")
+ public native @MachineSizedSInt long getFramesDisplayed ();
+
+ @Property(selector = "timeSinceLastUpdate")
+ public native double getTimeSinceLastUpdate ();
+
+ @Property(selector = "isPaused")
+ public native boolean isPaused ();
+
+ @Property(selector = "setPaused:")
+ public native void setPaused (boolean v);
+
+ @Property(selector = "pauseOnWillResignActive")
+ public native boolean isPauseOnWillResignActive ();
+
+ @Property(selector = "setPauseOnWillResignActive:")
+ public native void setPauseOnWillResignActive (boolean v);
+
+ @Property(selector = "resumeOnDidBecomeActive")
+ public native boolean isResumeOnDidBecomeActive ();
+
+ @Property(selector = "setResumeOnDidBecomeActive:")
+ public native void setResumeOnDidBecomeActive (boolean v);
+
+ @Property(selector = "glView")
+ public native MGLKView getGlView ();
+
+ /* */
+ /* *//* */
+ /* */
+ @Method(selector = "mglkView:drawInRect:")
+ public native void draw (MGLKView view, @ByVal CGRect rect);
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewControllerDelegate.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewControllerDelegate.java
new file mode 100644
index 00000000000..99dcbca023b
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewControllerDelegate.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.apple.foundation.NSObjectProtocol;
+import org.robovm.objc.annotation.Method;
+/**/
+
+/**/
+
+/**/
+/**//**/
+/**/public/* */ interface /* */ MGLKViewControllerDelegate/* */
+ /* */extends NSObjectProtocol/* */ {
+
+ /* */
+ /* */
+ /* */
+ /* */
+ /* *//* */
+ /* */
+
+ /* */
+ /* */
+ @Method(selector = "mglkViewControllerUpdate:")
+ void update (MGLKViewController controller);
+ /* */
+ /* */
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewControllerDelegateAdapter.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewControllerDelegateAdapter.java
new file mode 100644
index 00000000000..639970011ac
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewControllerDelegateAdapter.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.annotation.NotImplemented;
+/**/
+
+/**/
+/**/
+/**//**/
+/**/public/* */ class /* */ MGLKViewControllerDelegateAdapter/* */
+ extends /* */NSObject/* */
+ /* */ implements MGLKViewControllerDelegate/* */ {
+
+ /* */
+ /* */
+ /* */
+ /* */
+ /* *//* */
+ /* *//* */
+ /* */
+
+ /* */
+ /* *//* */
+ /* */
+ @NotImplemented("mglkViewControllerUpdate:")
+ public void update (MGLKViewController controller) {
+ }
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewDelegate.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewDelegate.java
new file mode 100644
index 00000000000..99a0ea33d1a
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewDelegate.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.apple.coregraphics.CGRect;
+import org.robovm.apple.foundation.NSObjectProtocol;
+import org.robovm.objc.annotation.Method;
+import org.robovm.rt.bro.annotation.ByVal;
+/**/
+
+/**/
+
+/**/
+/**//**/
+/**/public/* */ interface /* */ MGLKViewDelegate/* */
+ /* */extends NSObjectProtocol/* */ {
+
+ /* */
+ /* */
+ /* */
+ /* */
+ /* *//* */
+ /* */
+
+ /* */
+ /* */
+ @Method(selector = "mglkView:drawInRect:")
+ void draw (MGLKView view, @ByVal CGRect rect);
+ /* */
+ /* */
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewDelegateAdapter.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewDelegateAdapter.java
new file mode 100644
index 00000000000..0c9406fce52
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLKViewDelegateAdapter.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.apple.coregraphics.CGRect;
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.annotation.NotImplemented;
+import org.robovm.rt.bro.annotation.ByVal;
+/**/
+
+/**/
+/**/
+/**//**/
+/**/public/* */ class /* */ MGLKViewDelegateAdapter/* */
+ extends /* */NSObject/* */
+ /* */ implements MGLKViewDelegate/* */ {
+
+ /* */
+ /* */
+ /* */
+ /* */
+ /* *//* */
+ /* *//* */
+ /* */
+
+ /* */
+ /* *//* */
+ /* */
+ @NotImplemented("mglkView:drawInRect:")
+ public void draw (MGLKView view, @ByVal CGRect rect) {
+ }
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLLayer.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLLayer.java
new file mode 100644
index 00000000000..e78237983a1
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLLayer.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.apple.coreanimation.CALayer;
+import org.robovm.apple.coregraphics.CGSize;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.Method;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.objc.annotation.Property;
+import org.robovm.rt.bro.annotation.ByVal;
+import org.robovm.rt.bro.ptr.Ptr;
+/**/
+
+/**/
+
+/**/
+/**/@NativeClass
+/* */
+/* */public/* */ class /* */ MGLLayer/* */
+ extends /* */CALayer/* */
+/* *//* */ {
+
+ /* */public static class MGLLayerPtr extends Ptr {
+ }
+
+ /* */
+ /* */static {
+ ObjCRuntime.bind(MGLLayer.class);
+ }/* */
+ /* *//* */
+ /* */
+
+ protected MGLLayer () {
+ }
+
+ protected MGLLayer (Handle h, long handle) {
+ super(h, handle);
+ }
+
+ protected MGLLayer (SkipInit skipInit) {
+ super(skipInit);
+ }
+
+ /* */
+ /* */
+ @Property(selector = "drawableSize")
+ public native @ByVal CGSize getDrawableSize ();
+
+ @Property(selector = "defaultOpenGLFrameBufferID")
+ public native int getDefaultOpenGLFrameBufferID ();
+
+ @Property(selector = "drawableColorFormat")
+ public native MGLDrawableColorFormat getDrawableColorFormat ();
+
+ @Property(selector = "setDrawableColorFormat:")
+ public native void setDrawableColorFormat (MGLDrawableColorFormat v);
+
+ @Property(selector = "drawableDepthFormat")
+ public native MGLDrawableDepthFormat getDrawableDepthFormat ();
+
+ @Property(selector = "setDrawableDepthFormat:")
+ public native void setDrawableDepthFormat (MGLDrawableDepthFormat v);
+
+ @Property(selector = "drawableStencilFormat")
+ public native MGLDrawableStencilFormat getDrawableStencilFormat ();
+
+ @Property(selector = "setDrawableStencilFormat:")
+ public native void setDrawableStencilFormat (MGLDrawableStencilFormat v);
+
+ @Property(selector = "drawableMultisample")
+ public native MGLDrawableMultisample getDrawableMultisample ();
+
+ @Property(selector = "setDrawableMultisample:")
+ public native void setDrawableMultisample (MGLDrawableMultisample v);
+
+ @Property(selector = "retainedBacking")
+ public native boolean isRetainedBacking ();
+
+ @Property(selector = "setRetainedBacking:")
+ public native void setRetainedBacking (boolean v);
+
+ /* */
+ /* *//* */
+ /* */
+ @Method(selector = "present")
+ public native boolean present ();
+
+ @Method(selector = "bindDefaultFrameBuffer")
+ public native void bindDefaultFrameBuffer ();
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLRenderingAPI.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLRenderingAPI.java
new file mode 100644
index 00000000000..7d0bd93eba7
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLRenderingAPI.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.rt.bro.ValuedEnum;
+/**/
+
+/**/
+
+/**/
+/**//**/
+public enum /* */MGLRenderingAPI/* */ implements ValuedEnum {
+ /* */
+ OpenGLES1(1L), OpenGLES2(2L), OpenGLES3(3L);
+ /* */
+
+ /* */
+ /* */
+ /* *//* */
+ /* *//* */
+
+ private final long n;
+
+ private /* */ MGLRenderingAPI/* */ (long n) {
+ this.n = n;
+ }
+
+ public long value () {
+ return n;
+ }
+
+ public static /* */MGLRenderingAPI/* */ valueOf (long n) {
+ for (/* */MGLRenderingAPI/* */ v : values()) {
+ if (v.n == n) {
+ return v;
+ }
+ }
+ throw new IllegalArgumentException(
+ "No constant with value " + n + " found in " + /* */MGLRenderingAPI/* */.class.getName());
+ }
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLSharegroup.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLSharegroup.java
new file mode 100644
index 00000000000..f954947a47c
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/MGLSharegroup.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.rt.bro.ptr.Ptr;
+/**/
+
+/**/
+
+/**/
+/**/@NativeClass
+/* */
+/* */public/* */ class /* */ MGLSharegroup/* */
+ extends /* */NSObject/* */
+/* *//* */ {
+
+ /* */public static class MGLSharegroupPtr extends Ptr {
+ }
+
+ /* */
+ /* */static {
+ ObjCRuntime.bind(MGLSharegroup.class);
+ }/* */
+ /* *//* */
+ /* */
+
+ protected MGLSharegroup () {
+ }
+
+ protected MGLSharegroup (Handle h, long handle) {
+ super(h, handle);
+ }
+
+ protected MGLSharegroup (SkipInit skipInit) {
+ super(skipInit);
+ }
+ /* */
+ /* */
+
+ /* */
+ /* *//* */
+ /* */
+
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/khronos_boolean_enum_t.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/khronos_boolean_enum_t.java
new file mode 100644
index 00000000000..ea5d29f4ac4
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/bindings/metalangle/khronos_boolean_enum_t.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013-2015 RoboVM AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.badlogic.gdx.backends.iosrobovm.bindings.metalangle;
+
+/**/
+
+import org.robovm.rt.bro.ValuedEnum;
+/**/
+
+/**/
+
+/**/
+/**//**/
+public enum /* */khronos_boolean_enum_t/* */ implements ValuedEnum {
+ /* */
+ FALSE(0L), TRUE(1L), BOOLEAN_ENUM_FORCE_SIZE(2147483647L);
+ /* */
+
+ /* */
+ /* */
+ /* *//* */
+ /* *//* */
+
+ private final long n;
+
+ private /* */ khronos_boolean_enum_t/* */ (long n) {
+ this.n = n;
+ }
+
+ public long value () {
+ return n;
+ }
+
+ public static /* */khronos_boolean_enum_t/* */ valueOf (long n) {
+ for (/* */khronos_boolean_enum_t/* */ v : values()) {
+ if (v.n == n) {
+ return v;
+ }
+ }
+ throw new IllegalArgumentException(
+ "No constant with value " + n + " found in " + /* */khronos_boolean_enum_t/* */.class.getName());
+ }
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/HWMachine.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/HWMachine.java
new file mode 100644
index 00000000000..c016dde8924
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/HWMachine.java
@@ -0,0 +1,34 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.custom;
+
+import org.robovm.rt.bro.Bro;
+import org.robovm.rt.bro.Struct;
+import org.robovm.rt.bro.annotation.Bridge;
+import org.robovm.rt.bro.annotation.Library;
+import org.robovm.rt.bro.annotation.MachineSizedSInt;
+import org.robovm.rt.bro.ptr.BytePtr;
+import org.robovm.rt.bro.ptr.MachineSizedUIntPtr;
+import org.robovm.rt.bro.ptr.VoidPtr;
+
+/** DO NOT EDIT THIS FILE - it is machine generated */
+@Library("c")
+public class HWMachine {
+
+ static {
+ Bro.bind();
+ }
+
+ @Bridge
+ public static native int sysctlbyname (BytePtr name, VoidPtr oldp, MachineSizedUIntPtr oldlenp, VoidPtr newp,
+ @MachineSizedSInt long newlen);
+
+ public static String getMachineString () {
+ BytePtr name = BytePtr.toBytePtrAsciiZ("hw.machine");
+ MachineSizedUIntPtr size = new MachineSizedUIntPtr();
+ sysctlbyname(name, null, size, null, 0);
+ BytePtr machine = Struct.allocate(BytePtr.class, (int)size.get());
+ sysctlbyname(name, machine.as(VoidPtr.class), size, null, 0);
+ return machine.toStringAsciiZ();
+ }
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAcceleration.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAcceleration.java
new file mode 100644
index 00000000000..591255cb10c
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAcceleration.java
@@ -0,0 +1,70 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.custom;
+
+/**/
+import org.robovm.objc.*;
+import org.robovm.objc.annotation.*;
+import org.robovm.rt.bro.annotation.*;
+import org.robovm.rt.bro.ptr.*;
+import org.robovm.apple.foundation.*;
+
+/**/
+/**/
+/** DO NOT EDIT THIS FILE - it is machine generated
+ * @since Available in iOS 2.0 and later.
+ * @deprecated Deprecated in iOS 5.0. */
+@Deprecated
+/* */
+/* */
+@Library("UIKit")
+@NativeClass
+public class /* */
+/* */
+UIAcceleration extends /* */
+/* */
+ NSObject {
+
+ /* */
+ /* */
+ /* */
+ /** DO NOT EDIT THIS FILE - it is machine generated */
+ public static class UIAccelerationPtr extends Ptr {
+ }
+
+ /* */
+ /* */
+ static {
+ ObjCRuntime.bind(UIAcceleration.class);
+ }
+
+ /* */
+ /* */
+ /* */
+ /* */
+ public UIAcceleration () {
+ }
+
+ protected UIAcceleration (SkipInit skipInit) {
+ super(skipInit);
+ }
+
+ /* */
+ /* */
+ @Property(selector = "timestamp")
+ public native double getTimestamp ();
+
+ @Property(selector = "x")
+ public native double getX ();
+
+ @Property(selector = "y")
+ public native double getY ();
+
+ @Property(selector = "z")
+ public native double getZ ();
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAccelerometer.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAccelerometer.java
new file mode 100644
index 00000000000..3384d97a84c
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAccelerometer.java
@@ -0,0 +1,73 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.custom;
+
+/**/
+import org.robovm.objc.*;
+import org.robovm.objc.annotation.*;
+import org.robovm.rt.bro.annotation.*;
+import org.robovm.rt.bro.ptr.*;
+import org.robovm.apple.foundation.*;
+
+/**/
+/**/
+/** DO NOT EDIT THIS FILE - it is machine generated
+ * @since Available in iOS 2.0 and later.
+ * @deprecated Deprecated in iOS 5.0. */
+@Deprecated
+/* */
+/* */
+@Library("UIKit")
+@NativeClass
+public class /* */
+/* */
+UIAccelerometer extends /* */
+/* */
+ NSObject {
+
+ /* */
+ /* */
+ /* */
+ /** DO NOT EDIT THIS FILE - it is machine generated */
+ public static class UIAccelerometerPtr extends Ptr {
+ }
+
+ /* */
+ /* */
+ static {
+ ObjCRuntime.bind(UIAccelerometer.class);
+ }
+
+ /* */
+ /* */
+ /* */
+ /* */
+ public UIAccelerometer () {
+ }
+
+ protected UIAccelerometer (SkipInit skipInit) {
+ super(skipInit);
+ }
+
+ /* */
+ /* */
+ @Property(selector = "updateInterval")
+ public native double getUpdateInterval ();
+
+ @Property(selector = "setUpdateInterval:")
+ public native void setUpdateInterval (double v);
+
+ @Property(selector = "delegate")
+ public native UIAccelerometerDelegate getDelegate ();
+
+ @Property(selector = "setDelegate:", strongRef = true)
+ public native void setDelegate (UIAccelerometerDelegate v);
+
+ /* */
+ /* */
+ /* */
+ /* */
+ @Method(selector = "sharedAccelerometer")
+ public static native UIAccelerometer getSharedAccelerometer ();
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAccelerometerDelegate.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAccelerometerDelegate.java
new file mode 100644
index 00000000000..9fa72df5ae1
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAccelerometerDelegate.java
@@ -0,0 +1,39 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.custom;
+
+/**/
+import org.robovm.objc.annotation.*;
+import org.robovm.apple.foundation.*;
+
+/**/
+/**/
+/**/
+/**/
+/**/
+/** DO NOT EDIT THIS FILE - it is machine generated */
+public interface /* */
+/* */
+UIAccelerometerDelegate extends /* */
+/* */
+ NSObjectProtocol {
+
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /** @since Available in iOS 2.0 and later.
+ * @deprecated Deprecated in iOS 5.0. */
+ @Deprecated
+ @Method(selector = "accelerometer:didAccelerate:")
+ void didAccelerate (UIAccelerometer accelerometer, UIAcceleration acceleration);
+ /* */
+ /* */
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAccelerometerDelegateAdapter.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAccelerometerDelegateAdapter.java
new file mode 100644
index 00000000000..c3a9bda2d86
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/custom/UIAccelerometerDelegateAdapter.java
@@ -0,0 +1,45 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.custom;
+
+/**/
+import org.robovm.objc.annotation.*;
+import org.robovm.apple.foundation.*;
+
+/**/
+/**/
+/**/
+/**/
+/**/
+/** DO NOT EDIT THIS FILE - it is machine generated */
+public class /* */
+/* */
+UIAccelerometerDelegateAdapter extends /* */
+/* */
+ NSObject implements /* */
+/* */
+ UIAccelerometerDelegate {
+
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /** @since Available in iOS 2.0 and later.
+ * @deprecated Deprecated in iOS 5.0. */
+ @Deprecated
+ @NotImplemented("accelerometer:didAccelerate:")
+ public void didAccelerate (UIAccelerometer accelerometer, UIAcceleration acceleration) {
+ throw new UnsupportedOperationException();
+ }
+ /* */
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALBuffer.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALBuffer.java
new file mode 100644
index 00000000000..1fd6d53b0cc
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALBuffer.java
@@ -0,0 +1,19 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.objectal;
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.rt.bro.annotation.Library;
+
+/** DO NOT EDIT THIS FILE - it is machine generated
+ * @author Niklas Therning */
+@Library(Library.INTERNAL)
+@NativeClass
+public class ALBuffer extends NSObject {
+
+ static {
+ ObjCRuntime.bind(ALBuffer.class);
+ }
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALChannelSource.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALChannelSource.java
new file mode 100644
index 00000000000..b087b6d83da
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALChannelSource.java
@@ -0,0 +1,22 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.objectal;
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.objc.annotation.Property;
+import org.robovm.rt.bro.annotation.Library;
+
+/** DO NOT EDIT THIS FILE - it is machine generated */
+@Library(Library.INTERNAL)
+@NativeClass
+public final class ALChannelSource extends NSObject {
+
+ static {
+ ObjCRuntime.bind(ALChannelSource.class);
+ }
+
+ @Property(selector = "sourcePool")
+ public native ALSoundSourcePool getSourcePool ();
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALSoundSourcePool.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALSoundSourcePool.java
new file mode 100644
index 00000000000..042073571ee
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALSoundSourcePool.java
@@ -0,0 +1,23 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.objectal;
+
+import org.robovm.apple.foundation.NSArray;
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.objc.annotation.Property;
+import org.robovm.rt.bro.annotation.Library;
+
+/** DO NOT EDIT THIS FILE - it is machine generated */
+@Library(Library.INTERNAL)
+@NativeClass
+public class ALSoundSourcePool extends NSObject {
+
+ static {
+ ObjCRuntime.bind(ALSoundSourcePool.class);
+ }
+
+ @Property(selector = "sources")
+ public native NSArray getSources ();
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALSource.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALSource.java
new file mode 100644
index 00000000000..43bbaef59bc
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/ALSource.java
@@ -0,0 +1,48 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.objectal;
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.Method;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.objc.annotation.Property;
+import org.robovm.rt.bro.annotation.Library;
+
+/** DO NOT EDIT THIS FILE - it is machine generated
+ * @author Niklas Therning */
+@Library(Library.INTERNAL)
+@NativeClass
+public class ALSource extends NSObject {
+
+ static {
+ ObjCRuntime.bind(ALSource.class);
+ }
+
+ @Property(selector = "sourceId")
+ public native int getSourceId ();
+
+ @Property(selector = "state")
+ public native int getState ();
+
+ @Method(selector = "stop")
+ public native void stop ();
+
+ @Property(selector = "paused")
+ public native boolean isPaused ();
+
+ @Property(selector = "setPaused:")
+ public native void setPaused (boolean paused);
+
+ @Method(selector = "setVolume:")
+ public native void setVolume (float volume);
+
+ @Method(selector = "setPitch:")
+ public native void setPitch (float pitch);
+
+ @Method(selector = "setPan:")
+ public native void setPan (float pan);
+
+ @Method(selector = "setLooping:")
+ public native void setLooping (boolean shouldLoop);
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/AVAudioPlayerDelegate.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/AVAudioPlayerDelegate.java
new file mode 100644
index 00000000000..d90fb90ca67
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/AVAudioPlayerDelegate.java
@@ -0,0 +1,15 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.objectal;
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.apple.foundation.NSObjectProtocol;
+import org.robovm.objc.annotation.Method;
+
+/** DO NOT EDIT THIS FILE - it is machine generated
+ * @author Niklas Therning */
+public interface AVAudioPlayerDelegate extends NSObjectProtocol {
+
+ @Method(selector = "audioPlayerDidFinishPlaying:successfully:")
+ void didFinishPlaying (NSObject player, boolean success);
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/AVAudioPlayerDelegateAdapter.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/AVAudioPlayerDelegateAdapter.java
new file mode 100644
index 00000000000..0a0cc81218d
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/AVAudioPlayerDelegateAdapter.java
@@ -0,0 +1,16 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.objectal;
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.annotation.NotImplemented;
+
+/** DO NOT EDIT THIS FILE - it is machine generated
+ * @author Niklas Therning */
+public class AVAudioPlayerDelegateAdapter extends NSObject implements AVAudioPlayerDelegate {
+
+ @NotImplemented("audioPlayerDidFinishPlaying:successfully:")
+ public void didFinishPlaying (NSObject player, boolean success) {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALAudioSession.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALAudioSession.java
new file mode 100644
index 00000000000..8f5d8a706a1
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALAudioSession.java
@@ -0,0 +1,25 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.objectal;
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.Method;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.rt.bro.annotation.Library;
+
+/** DO NOT EDIT THIS FILE - it is machine generated */
+@Library(Library.INTERNAL)
+@NativeClass
+public final class OALAudioSession extends NSObject {
+
+ static {
+ ObjCRuntime.bind(OALAudioSession.class);
+ }
+
+ @Method
+ public native static OALAudioSession sharedInstance ();
+
+ @Method
+ public native void forceEndInterruption ();
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALAudioTrack.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALAudioTrack.java
new file mode 100644
index 00000000000..dfbb27119fa
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALAudioTrack.java
@@ -0,0 +1,81 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.objectal;
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.Method;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.objc.annotation.Property;
+import org.robovm.rt.bro.annotation.Library;
+
+/** DO NOT EDIT THIS FILE - it is machine generated
+ * @author Niklas Therning */
+@Library(Library.INTERNAL)
+@NativeClass
+public class OALAudioTrack extends NSObject {
+
+ static {
+ ObjCRuntime.bind(OALAudioTrack.class);
+ }
+
+ @Method(selector = "track")
+ public native static OALAudioTrack create ();
+
+ @Method
+ public native boolean preloadFile (String filePath);
+
+ @Method
+ public native void stop ();
+
+ @Method
+ public native void clear ();
+
+ @Method
+ public native boolean play ();
+
+ @Method
+ public native boolean playFile (String filePath);
+
+ @Method(selector = "playFile:loops:")
+ public native boolean playFile (String filePath, int numberOfLoops);
+
+ @Property
+ public native boolean isPaused ();
+
+ @Property
+ public native void setPaused (boolean paused);
+
+ @Property
+ public native boolean isPlaying ();
+
+ @Property
+ public native float getVolume ();
+
+ @Property
+ public native void setVolume (float volume);
+
+ @Property
+ public native float getPan ();
+
+ @Property
+ public native void setPan (float pan);
+
+ @Property
+ public native double getCurrentTime ();
+
+ @Property
+ public native void setCurrentTime (double currentTime);
+
+ @Property
+ public native int getNumberOfLoops ();
+
+ @Property
+ public native void setNumberOfLoops (int numberOfLoops);
+
+ @Property
+ public native AVAudioPlayerDelegate getDelegate ();
+
+ @Property(strongRef = true)
+ public native void setDelegate (AVAudioPlayerDelegate delegate);
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALIOSAudio.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALIOSAudio.java
new file mode 100644
index 00000000000..f85c8c4addc
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALIOSAudio.java
@@ -0,0 +1,94 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.objectal;
+
+import com.badlogic.gdx.Gdx;
+import com.badlogic.gdx.audio.AudioDevice;
+import com.badlogic.gdx.audio.AudioRecorder;
+import com.badlogic.gdx.audio.Music;
+import com.badlogic.gdx.audio.Sound;
+import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;
+import com.badlogic.gdx.backends.iosrobovm.IOSAudio;
+import com.badlogic.gdx.backends.iosrobovm.IOSMusic;
+import com.badlogic.gdx.backends.iosrobovm.IOSSound;
+import com.badlogic.gdx.files.FileHandle;
+import com.badlogic.gdx.utils.GdxRuntimeException;
+
+/** DO NOT EDIT THIS FILE - it is machine generated */
+public class OALIOSAudio implements IOSAudio {
+
+ private final IOSApplicationConfiguration config;
+
+ public OALIOSAudio (IOSApplicationConfiguration config) {
+ this.config = config;
+ if (!config.useAudio) return;
+ OALSimpleAudio audio = OALSimpleAudio.sharedInstance();
+ if (audio != null) {
+ audio.setAllowIpod(config.allowIpod);
+ audio.setHonorSilentSwitch(!config.overrideRingerSwitch);
+ } else
+ Gdx.app.error("IOSAudio", "No OALSimpleAudio instance available, audio will not be availabe");
+ }
+
+ @Override
+ public AudioDevice newAudioDevice (int samplingRate, boolean isMono) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public AudioRecorder newAudioRecorder (int samplingRate, boolean isMono) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Sound newSound (FileHandle fileHandle) {
+ return new IOSSound(fileHandle);
+ }
+
+ @Override
+ public Music newMusic (FileHandle fileHandle) {
+ String path = fileHandle.file().getPath().replace('\\', '/');
+ OALAudioTrack track = OALAudioTrack.create();
+ if (track != null) {
+ return new IOSMusic(track, path);
+ }
+ throw new GdxRuntimeException("Error creating music audio track");
+ }
+
+ @Override
+ public void didBecomeActive () {
+ // workaround for ObjectAL crash problem
+ // see: https://groups.google.com/g/objectal-for-iphone/c/ubRWltp_i1Q
+ forceEndInterruption();
+ if (config.allowIpod) {
+ OALSimpleAudio audio = OALSimpleAudio.sharedInstance();
+ if (audio != null) {
+ audio.setUseHardwareIfAvailable(false);
+ }
+ }
+ }
+
+ @Override
+ public void willEnterForeground () {
+ // workaround for ObjectAL crash problem
+ // see: https://groups.google.com/forum/?fromgroups=#!topic/objectal-for-iphone/ubRWltp_i1Q
+ forceEndInterruption();
+ }
+
+ @Override
+ public void willResignActive () {
+ }
+
+ @Override
+ public void willTerminate () {
+ }
+
+ private void forceEndInterruption () {
+ OALAudioSession audioSession = OALAudioSession.sharedInstance();
+ if (audioSession != null) {
+ audioSession.forceEndInterruption();
+ }
+ }
+}
diff --git a/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALSimpleAudio.java b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALSimpleAudio.java
new file mode 100644
index 00000000000..00b82782fb5
--- /dev/null
+++ b/backends/gdx-backend-robovm-metalangle/src/com/badlogic/gdx/backends/iosrobovm/objectal/OALSimpleAudio.java
@@ -0,0 +1,57 @@
+/*DO NOT EDIT THIS FILE - it is machine generated*/
+
+package com.badlogic.gdx.backends.iosrobovm.objectal;
+
+import org.robovm.apple.foundation.NSObject;
+import org.robovm.objc.ObjCRuntime;
+import org.robovm.objc.annotation.Method;
+import org.robovm.objc.annotation.NativeClass;
+import org.robovm.objc.annotation.Property;
+import org.robovm.rt.bro.annotation.Library;
+
+/** DO NOT EDIT THIS FILE - it is machine generated
+ * @author Niklas Therning */
+@Library(Library.INTERNAL)
+@NativeClass
+public final class OALSimpleAudio extends NSObject {
+
+ static {
+ ObjCRuntime.bind(OALSimpleAudio.class);
+ }
+
+ @Method
+ public native static OALSimpleAudio sharedInstance ();
+
+ @Method
+ public native ALBuffer preloadEffect (String filePath);
+
+ @Method
+ public native boolean unloadEffect (String filePath);
+
+ @Method(selector = "playEffect:volume:pitch:pan:loop:")
+ public native ALSource playEffect (String filePath, float volume, float pitch, float pan, boolean loop);
+
+ @Method(selector = "playBuffer:volume:pitch:pan:loop:")
+ public native ALSource playBuffer (ALBuffer buffer, float volume, float pitch, float pan, boolean loop);
+
+ @Property
+ public native boolean isAllowIpod ();
+
+ @Property
+ public native void setAllowIpod (boolean allowIpod);
+
+ @Property
+ public native boolean isHonorSilentSwitch ();
+
+ @Property
+ public native void setHonorSilentSwitch (boolean honorSilentSwitch);
+
+ @Property
+ public native boolean isUseHardwareIfAvailable ();
+
+ @Property
+ public native void setUseHardwareIfAvailable (boolean useHardwareIfAvailable);
+
+ @Property(selector = "channel")
+ public native ALChannelSource getChannelSource ();
+}
diff --git a/backends/gdx-backend-robovm/build.gradle b/backends/gdx-backend-robovm/build.gradle
index ef6da18d50d..e50bda7d487 100644
--- a/backends/gdx-backend-robovm/build.gradle
+++ b/backends/gdx-backend-robovm/build.gradle
@@ -13,6 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
+sourceSets {
+ main {
+ resources {
+ srcDir 'res'
+ }
+ }
+}
dependencies {
api libraries.robovm
diff --git a/backends/gdx-backend-robovm/res/META-INF/robovm/ios/robovm.xml b/backends/gdx-backend-robovm/res/META-INF/robovm/ios/robovm.xml
new file mode 100644
index 00000000000..adccdf856a9
--- /dev/null
+++ b/backends/gdx-backend-robovm/res/META-INF/robovm/ios/robovm.xml
@@ -0,0 +1,5 @@
+
+
+ OpenGLES
+
+
\ No newline at end of file
diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/robovm.xml b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/robovm.xml
index a75cf776e33..8a0f689bc68 100644
--- a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/robovm.xml
+++ b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/robovm.xml
@@ -37,7 +37,6 @@
UIKit
- OpenGLES
QuartzCore
CoreGraphics
OpenAL
diff --git a/publish.gradle b/publish.gradle
index a92ff90c001..c18dca0ab11 100644
--- a/publish.gradle
+++ b/publish.gradle
@@ -5,6 +5,7 @@ configure([
project(":backends:gdx-backend-lwjgl"),
project(":backends:gdx-backend-lwjgl3"),
project(":backends:gdx-backend-robovm"),
+ project(":backends:gdx-backend-robovm-metalangle"),
project(":backends:gdx-backend-gwt"),
project(":extensions:gdx-box2d-parent"),
project(":extensions:gdx-box2d-parent:gdx-box2d"),
diff --git a/settings.gradle b/settings.gradle
index 38d617bf1db..a8ddc84c360 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -21,6 +21,7 @@ include ":backends:gdx-backend-headless"
include ":backends:gdx-backend-lwjgl"
include ":backends:gdx-backend-lwjgl3"
include ":backends:gdx-backend-robovm"
+include ":backends:gdx-backend-robovm-metalangle"
include ":backends:gdx-backends-gwt"
project(":backends:gdx-backends-gwt").name = "gdx-backend-gwt"