Skip to content
Draft
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 .github/workflows/j3o-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '17'
java-version: '25'

- name: Scan J3O assets
run: ./gradlew :jme3-desktop:scanJ3O --console=plain
86 changes: 20 additions & 66 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'
- name: Validate the Gradle wrapper
uses: gradle/actions/wrapper-validation@v6.1.0
- name: Run Checkstyle
Expand All @@ -96,7 +96,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'
- name: Validate the Gradle wrapper
uses: gradle/actions/wrapper-validation@v6.1.0
- name: Run SpotBugs
Expand All @@ -120,6 +120,11 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v6
- name: Setup the java environment
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
- name: Start xvfb
run: |
Xvfb :99 -ac -screen 0 1024x768x16 &
Expand Down Expand Up @@ -150,45 +155,6 @@ jobs:
**/build/changed-images/**
**/build/test-results/**

# Build iOS natives
BuildIosNatives:
name: Build natives for iOS
runs-on: macOS-14

steps:
- name: Check default JAVAs
run: echo $JAVA_HOME --- $JAVA_HOME_8_X64 --- $JAVA_HOME_11_X64 --- $JAVA_HOME_17_X64 --- $JAVA_HOME_21_X64 ---

- name: Setup the java environment
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'

- name: Setup the XCode version to 15.1.0
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
with:
xcode-version: '15.1.0'

- name: Clone the repo
uses: actions/checkout@v6
with:
fetch-depth: 1

- name: Validate the Gradle wrapper
uses: gradle/actions/wrapper-validation@v6.1.0

- name: Build
run: |
./gradlew -PuseCommitHashAsVersionName=true --no-daemon -PbuildNativeProjects=true \
:jme3-ios-native:build

- name: Upload natives
uses: actions/upload-artifact@v7.0.1
with:
name: ios-natives
path: jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework

# Build the natives on android
BuildAndroidNatives:
name: Build natives for android
Expand All @@ -202,11 +168,11 @@ jobs:
with:
fetch-depth: 1

- name: Setup Java 17
- name: Setup Java 25
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '17'
java-version: '25'

- name: Check java version
run: java -version
Expand Down Expand Up @@ -234,7 +200,7 @@ jobs:

# Build the engine, we only deploy from ubuntu-latest jdk25
BuildJMonkey:
needs: [BuildAndroidNatives, BuildIosNatives]
needs: [BuildAndroidNatives]
name: Build on ${{ matrix.osName }} jdk${{ matrix.jdk }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -259,18 +225,18 @@ jobs:
with:
fetch-depth: 1

- name: Setup the java environment
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}

- name: Download natives for android
uses: actions/download-artifact@v8.0.1
with:
name: android-natives
path: build/native

- name: Download natives for iOS
uses: actions/download-artifact@v8.0.1
with:
name: ios-natives
path: jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework

- name: Validate the Gradle wrapper
uses: gradle/actions/wrapper-validation@v6.1.0
- name: Build Engine
Expand Down Expand Up @@ -453,25 +419,19 @@ jobs:
with:
fetch-depth: 1

# Setup jdk 21 used for building Maven-style artifacts
# Setup jdk 25 used for building Maven-style artifacts
- name: Setup the java environment
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'

- name: Download natives for android
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: android-natives
path: build/native

- name: Download natives for iOS
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ios-natives
path: jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework

- name: Rebuild the maven artifacts and upload them to Sonatype's maven-snapshots repo
run: |
if [ "${{ secrets.CENTRAL_PASSWORD }}" = "" ];
Expand Down Expand Up @@ -502,12 +462,12 @@ jobs:
with:
fetch-depth: 1

# Setup jdk 21 used for building Sonatype artifacts
# Setup jdk 25 used for building Sonatype artifacts
- name: Setup the java environment
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'

# Download all the stuff...
- name: Download maven artifacts
Expand All @@ -528,12 +488,6 @@ jobs:
name: android-natives
path: build/native

- name: Download natives for iOS
uses: actions/download-artifact@v8.0.1
with:
name: ios-natives
path: jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework

- name: Rebuild the maven artifacts and upload them to Sonatype's Central Publisher Portal
run: |
if [ "${{ secrets.CENTRAL_PASSWORD }}" = "" ];
Expand Down
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ apply from: file('version.gradle')

allprojects {
repositories {
mavenLocal()
mavenCentral()
maven {
name = 'CentralSnapshots'
url = uri('https://central.sonatype.com/repository/maven-snapshots/')
mavenContent {
snapshotsOnly()
}
}
google()
}
tasks.withType(Jar) {
Expand Down
5 changes: 5 additions & 0 deletions jme3-core/src/main/java/com/jme3/renderer/Caps.java
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ public enum Caps {
*/
DepthTexture,

/**
* Supports hardware depth texture comparison for shadow maps.
*/
TextureShadowCompare,

/**
* Supports 32-bit index buffers.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ private void loadCapabilitiesCommon() {
caps.add(Caps.DepthTexture);
}

if (gl2 != null || caps.contains(Caps.OpenGLES30)) {
caps.add(Caps.TextureShadowCompare);
}

if (caps.contains(Caps.OpenGL20) || caps.contains(Caps.OpenGLES30) || caps.contains(Caps.WebGL)
|| hasExtension("GL_OES_depth24")) {
caps.add(Caps.Depth24);
Expand Down Expand Up @@ -2674,7 +2678,7 @@ && isMipmapGenerationSupported(image.getFormat(),
}

ShadowCompareMode texCompareMode = tex.getShadowCompareMode();
if ( (gl2 != null || caps.contains(Caps.OpenGLES30)) && curState.shadowCompareMode != texCompareMode) {
if (caps.contains(Caps.TextureShadowCompare) && curState.shadowCompareMode != texCompareMode) {
bindTextureAndUnit(target, image, unit);
if (texCompareMode != ShadowCompareMode.Off) {
gl.glTexParameteri(target, GL2.GL_TEXTURE_COMPARE_MODE, GL2.GL_COMPARE_REF_TO_TEXTURE);
Expand Down
13 changes: 10 additions & 3 deletions jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java
Original file line number Diff line number Diff line change
Expand Up @@ -377,16 +377,23 @@ public void init() {
file = new File(url.getFile());
fileLastM = file.lastModified();

} catch (NoSuchFieldException
| SecurityException
} catch (NoSuchFieldException ex) {
Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.FINE,
"Material hot reload disabled for {0}; asset URL is not reflectively available.",
fileName);
} catch (SecurityException
| IllegalArgumentException
| IllegalAccessException ex) {
Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.SEVERE, null, ex);
Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.FINE,
"Material hot reload disabled for " + fileName, ex);
}
}
}

public boolean shouldFire() {
if (file == null || fileLastM == null) {
return false;
}
if (file.lastModified() != fileLastM) {
fileLastM = file.lastModified();
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public void simpleInitApp() {

updateMaterial();


}


Expand Down Expand Up @@ -153,4 +152,5 @@ private void updateMaterial() {
"Tank material -> metallic: " + metallic + ", roughness: " + roughness
+ " (N/P, F toggles SH fast path)");
}

}
Loading
Loading