Skip to content
Closed
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
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ jobs:
name: android-natives
path: build/native

# Build the engine, we only deploy from ubuntu-latest jdk21
# Build the engine, we only deploy from ubuntu-latest jdk25
BuildJMonkey:
needs: [BuildAndroidNatives, BuildIosNatives]
name: Build on ${{ matrix.osName }} jdk${{ matrix.jdk }}
Expand All @@ -241,7 +241,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest,windows-latest,macOS-latest]
jdk: [17, 21]
jdk: [17, 21, 25]
include:
- os: ubuntu-latest
osName: linux
Expand All @@ -254,6 +254,8 @@ jobs:
deploy: false
- jdk: 17
deploy: false
- jdk: 21
deploy: false

steps:
- name: Clone the repo
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ lwjgl3-opencl = { module = "org.lwjgl:lwjgl-opencl", version.ref = "lwjgl3"
lwjgl3-opengl = { module = "org.lwjgl:lwjgl-opengl", version.ref = "lwjgl3" }
lwjgl3-sdl = { module = "org.lwjgl:lwjgl-sdl", version.ref = "lwjgl3" }

mokito-core = "org.mockito:mockito-core:3.12.4"
mokito-junit-jupiter = "org.mockito:mockito-junit-jupiter:3.12.4"
mokito-core = "org.mockito:mockito-core:5.23.0"
mokito-junit-jupiter = "org.mockito:mockito-junit-jupiter:5.23.0"

nifty = { module = "com.github.nifty-gui:nifty", version.ref = "nifty" }
nifty-default-controls = { module = "com.github.nifty-gui:nifty-default-controls", version.ref = "nifty" }
Expand Down
24 changes: 16 additions & 8 deletions jme3-core/src/main/java/com/jme3/anim/SkinningControl.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2025 jMonkeyEngine
* Copyright (c) 2009-2026 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -522,8 +522,10 @@ private void applySkinning(Mesh mesh, Matrix4f[] offsetMatrices) {
fvb.rewind();

VertexBuffer nb = mesh.getBuffer(Type.Normal);
FloatBuffer fnb = (FloatBuffer) nb.getData();
fnb.rewind();
FloatBuffer fnb = (nb == null) ? null : (FloatBuffer) nb.getData();
if (fnb != null) {
fnb.rewind();
}

// get boneIndexes and weights for mesh
IndexBuffer ib = IndexBuffer.wrapIndexBuffer(mesh.getBuffer(Type.BoneIndex).getData());
Expand All @@ -545,7 +547,9 @@ private void applySkinning(Mesh mesh, Matrix4f[] offsetMatrices) {
// read next set of positions and normals from native buffer
bufLength = Math.min(posBuf.length, fvb.remaining());
fvb.get(posBuf, 0, bufLength);
fnb.get(normBuf, 0, bufLength);
if (fnb != null) {
fnb.get(normBuf, 0, bufLength);
}
int verts = bufLength / 3;
int idxPositions = 0;

Expand Down Expand Up @@ -593,14 +597,18 @@ private void applySkinning(Mesh mesh, Matrix4f[] offsetMatrices) {

fvb.position(fvb.position() - bufLength);
fvb.put(posBuf, 0, bufLength);
fnb.position(fnb.position() - bufLength);
fnb.put(normBuf, 0, bufLength);
if (fnb != null) {
fnb.position(fnb.position() - bufLength);
fnb.put(normBuf, 0, bufLength);
}
}

vars.release();

vb.updateData(fvb);
nb.updateData(fnb);
if (nb != null) {
nb.updateData(fnb);
}
}

/**
Expand Down Expand Up @@ -745,7 +753,7 @@ private void applySkinningTangents(Mesh mesh, Matrix4f[] offsetMatrices, VertexB
vars.release();

vb.updateData(fvb);
if (nb != null) {
if (fnb != null) {
nb.updateData(fnb);
}
tb.updateData(ftb);
Expand Down