AbstractShadowRenderer: fix displayFrustum
public class TestShadowRenderer extends SimpleApplication {
@Override
public void simpleInitApp() {
PointLight pl = new PointLight();
pl.setPosition(new Vector3f(5, 5, 5));
pl.setRadius(10);
rootNode.addLight(pl);
PointLightShadowRenderer plsr = new PointLightShadowRenderer(assetManager, 512);
plsr.setLight(pl);
plsr.displayFrustum();
viewPort.addProcessor(plsr);
}
}
SEVERE: Uncaught exception thrown in Thread[#32,jME3 Main,5,main]
java.lang.IllegalStateException: Scene graph is not properly updated for rendering.
State was changed after rootNode.updateGeometricState() call.
Make sure you do not modify the scene from another thread!
Problem spatial name: Root Node
at com.jme3.scene.Spatial.checkCulling(Spatial.java:367)
at com.jme3.shadow.ShadowUtil.addGeometriesInCamFrustumAndViewPortFromNode(ShadowUtil.java:778)
at com.jme3.shadow.ShadowUtil.getLitGeometriesInViewPort(ShadowUtil.java:759)
at com.jme3.shadow.PointLightShadowRenderer.getReceivers(PointLightShadowRenderer.java:149)
at com.jme3.shadow.AbstractShadowRenderer.postFrame(AbstractShadowRenderer.java:496)
at com.jme3.renderer.pipeline.ForwardPipeline.pipelineRender(ForwardPipeline.java:127)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1313)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1355)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:283)
at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:707)
at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:797)
at java.base/java.lang.Thread.run(Thread.java:1583)
🖼️ Screenshot tests have failed.
The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests.
📄 Where to find the report:
- Go to the (failed run) > Summary > Artifacts > screenshot-test-report
- Download the zip and open jme3-screenshot-tests/build/reports/ScreenshotDiffReport.html
⚠️ If you didn't expect to change anything visual: Fix your changes so the screenshot tests pass.
✅ If you did mean to change things: Review the replacement images in jme3-screenshot-tests/build/changed-images to make sure they really are improvements and then replace and commit the replacement images at jme3-screenshot-tests/src/test/resources.
✨ If you are creating entirely new tests: Find the new images in jme3-screenshot-tests/build/changed-images and commit the new images at jme3-screenshot-tests/src/test/resources.
Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar".
See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information
Contact @richardTingle (aka richtea) for guidance if required
@capdevon would you please take another look at this PR?
I don’t currently have a local copy of the branch, and I have no objections to the requested change. If possible, please go ahead and apply it.