Skip to content

Commit c4a3092

Browse files
committed
ios backend
1 parent da0188e commit c4a3092

47 files changed

Lines changed: 3272 additions & 5255 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/j3o-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/setup-java@v5
3535
with:
3636
distribution: temurin
37-
java-version: '17'
37+
java-version: '25'
3838

3939
- name: Scan J3O assets
4040
run: ./gradlew :jme3-desktop:scanJ3O --console=plain

.github/workflows/main.yml

Lines changed: 20 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
uses: actions/setup-java@v5
7070
with:
7171
distribution: 'temurin'
72-
java-version: '21'
72+
java-version: '25'
7373
- name: Validate the Gradle wrapper
7474
uses: gradle/actions/wrapper-validation@v6.1.0
7575
- name: Run Checkstyle
@@ -96,7 +96,7 @@ jobs:
9696
uses: actions/setup-java@v5
9797
with:
9898
distribution: 'temurin'
99-
java-version: '21'
99+
java-version: '25'
100100
- name: Validate the Gradle wrapper
101101
uses: gradle/actions/wrapper-validation@v6.1.0
102102
- name: Run SpotBugs
@@ -120,6 +120,11 @@ jobs:
120120
contents: read
121121
steps:
122122
- uses: actions/checkout@v6
123+
- name: Setup the java environment
124+
uses: actions/setup-java@v5
125+
with:
126+
distribution: 'temurin'
127+
java-version: '25'
123128
- name: Start xvfb
124129
run: |
125130
Xvfb :99 -ac -screen 0 1024x768x16 &
@@ -150,45 +155,6 @@ jobs:
150155
**/build/changed-images/**
151156
**/build/test-results/**
152157
153-
# Build iOS natives
154-
BuildIosNatives:
155-
name: Build natives for iOS
156-
runs-on: macOS-14
157-
158-
steps:
159-
- name: Check default JAVAs
160-
run: echo $JAVA_HOME --- $JAVA_HOME_8_X64 --- $JAVA_HOME_11_X64 --- $JAVA_HOME_17_X64 --- $JAVA_HOME_21_X64 ---
161-
162-
- name: Setup the java environment
163-
uses: actions/setup-java@v5
164-
with:
165-
distribution: 'temurin'
166-
java-version: '17'
167-
168-
- name: Setup the XCode version to 15.1.0
169-
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
170-
with:
171-
xcode-version: '15.1.0'
172-
173-
- name: Clone the repo
174-
uses: actions/checkout@v6
175-
with:
176-
fetch-depth: 1
177-
178-
- name: Validate the Gradle wrapper
179-
uses: gradle/actions/wrapper-validation@v6.1.0
180-
181-
- name: Build
182-
run: |
183-
./gradlew -PuseCommitHashAsVersionName=true --no-daemon -PbuildNativeProjects=true \
184-
:jme3-ios-native:build
185-
186-
- name: Upload natives
187-
uses: actions/upload-artifact@v7.0.1
188-
with:
189-
name: ios-natives
190-
path: jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework
191-
192158
# Build the natives on android
193159
BuildAndroidNatives:
194160
name: Build natives for android
@@ -202,11 +168,11 @@ jobs:
202168
with:
203169
fetch-depth: 1
204170

205-
- name: Setup Java 17
171+
- name: Setup Java 25
206172
uses: actions/setup-java@v5
207173
with:
208174
distribution: temurin
209-
java-version: '17'
175+
java-version: '25'
210176

211177
- name: Check java version
212178
run: java -version
@@ -234,7 +200,7 @@ jobs:
234200

235201
# Build the engine, we only deploy from ubuntu-latest jdk25
236202
BuildJMonkey:
237-
needs: [BuildAndroidNatives, BuildIosNatives]
203+
needs: [BuildAndroidNatives]
238204
name: Build on ${{ matrix.osName }} jdk${{ matrix.jdk }}
239205
runs-on: ${{ matrix.os }}
240206
strategy:
@@ -259,18 +225,18 @@ jobs:
259225
with:
260226
fetch-depth: 1
261227

228+
- name: Setup the java environment
229+
uses: actions/setup-java@v5
230+
with:
231+
distribution: 'temurin'
232+
java-version: ${{ matrix.jdk }}
233+
262234
- name: Download natives for android
263235
uses: actions/download-artifact@v8.0.1
264236
with:
265237
name: android-natives
266238
path: build/native
267239

268-
- name: Download natives for iOS
269-
uses: actions/download-artifact@v8.0.1
270-
with:
271-
name: ios-natives
272-
path: jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework
273-
274240
- name: Validate the Gradle wrapper
275241
uses: gradle/actions/wrapper-validation@v6.1.0
276242
- name: Build Engine
@@ -453,25 +419,19 @@ jobs:
453419
with:
454420
fetch-depth: 1
455421

456-
# Setup jdk 21 used for building Maven-style artifacts
422+
# Setup jdk 25 used for building Maven-style artifacts
457423
- name: Setup the java environment
458424
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
459425
with:
460426
distribution: 'temurin'
461-
java-version: '21'
427+
java-version: '25'
462428

463429
- name: Download natives for android
464430
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
465431
with:
466432
name: android-natives
467433
path: build/native
468434

469-
- name: Download natives for iOS
470-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
471-
with:
472-
name: ios-natives
473-
path: jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework
474-
475435
- name: Rebuild the maven artifacts and upload them to Sonatype's maven-snapshots repo
476436
run: |
477437
if [ "${{ secrets.CENTRAL_PASSWORD }}" = "" ];
@@ -502,12 +462,12 @@ jobs:
502462
with:
503463
fetch-depth: 1
504464

505-
# Setup jdk 21 used for building Sonatype artifacts
465+
# Setup jdk 25 used for building Sonatype artifacts
506466
- name: Setup the java environment
507467
uses: actions/setup-java@v5
508468
with:
509469
distribution: 'temurin'
510-
java-version: '21'
470+
java-version: '25'
511471

512472
# Download all the stuff...
513473
- name: Download maven artifacts
@@ -528,12 +488,6 @@ jobs:
528488
name: android-natives
529489
path: build/native
530490

531-
- name: Download natives for iOS
532-
uses: actions/download-artifact@v8.0.1
533-
with:
534-
name: ios-natives
535-
path: jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework
536-
537491
- name: Rebuild the maven artifacts and upload them to Sonatype's Central Publisher Portal
538492
run: |
539493
if [ "${{ secrets.CENTRAL_PASSWORD }}" = "" ];

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ apply from: file('version.gradle')
2626

2727
allprojects {
2828
repositories {
29+
mavenLocal()
2930
mavenCentral()
31+
maven {
32+
name = 'CentralSnapshots'
33+
url = uri('https://central.sonatype.com/repository/maven-snapshots/')
34+
mavenContent {
35+
snapshotsOnly()
36+
}
37+
}
3038
google()
3139
}
3240
tasks.withType(Jar) {

jme3-core/src/main/java/com/jme3/renderer/Caps.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,11 @@ public enum Caps {
427427
*/
428428
DepthTexture,
429429

430+
/**
431+
* Supports hardware depth texture comparison for shadow maps.
432+
*/
433+
TextureShadowCompare,
434+
430435
/**
431436
* Supports 32-bit index buffers.
432437
*/

jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,10 @@ private void loadCapabilitiesCommon() {
453453
caps.add(Caps.DepthTexture);
454454
}
455455

456+
if (gl2 != null || caps.contains(Caps.OpenGLES30)) {
457+
caps.add(Caps.TextureShadowCompare);
458+
}
459+
456460
if (caps.contains(Caps.OpenGL20) || caps.contains(Caps.OpenGLES30) || caps.contains(Caps.WebGL)
457461
|| hasExtension("GL_OES_depth24")) {
458462
caps.add(Caps.Depth24);
@@ -2674,7 +2678,7 @@ && isMipmapGenerationSupported(image.getFormat(),
26742678
}
26752679

26762680
ShadowCompareMode texCompareMode = tex.getShadowCompareMode();
2677-
if ( (gl2 != null || caps.contains(Caps.OpenGLES30)) && curState.shadowCompareMode != texCompareMode) {
2681+
if (caps.contains(Caps.TextureShadowCompare) && curState.shadowCompareMode != texCompareMode) {
26782682
bindTextureAndUnit(target, image, unit);
26792683
if (texCompareMode != ShadowCompareMode.Off) {
26802684
gl.glTexParameteri(target, GL2.GL_TEXTURE_COMPARE_MODE, GL2.GL_COMPARE_REF_TO_TEXTURE);

jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,16 +377,23 @@ public void init() {
377377
file = new File(url.getFile());
378378
fileLastM = file.lastModified();
379379

380-
} catch (NoSuchFieldException
381-
| SecurityException
380+
} catch (NoSuchFieldException ex) {
381+
Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.FINE,
382+
"Material hot reload disabled for {0}; asset URL is not reflectively available.",
383+
fileName);
384+
} catch (SecurityException
382385
| IllegalArgumentException
383386
| IllegalAccessException ex) {
384-
Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.SEVERE, null, ex);
387+
Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.FINE,
388+
"Material hot reload disabled for " + fileName, ex);
385389
}
386390
}
387391
}
388392

389393
public boolean shouldFire() {
394+
if (file == null || fileLastM == null) {
395+
return false;
396+
}
390397
if (file.lastModified() != fileLastM) {
391398
fileLastM = file.lastModified();
392399
return true;

0 commit comments

Comments
 (0)