(SOLVED) Error: No enum constant com.jme3.renderer.Caps.GLSL320

I get an error when adding any j3o model to the scene composer.

java.lang.IllegalArgumentException: No enum constant com.jme3.renderer.Caps.GLSL320
	at java.lang.Enum.valueOf(Enum.java:238)
	at com.jme3.renderer.Caps.valueOf(Caps.java:49)
	at com.jme3.material.TechniqueDef.setShaderFile(TechniqueDef.java:550)
	at com.jme3.material.plugins.J3MLoader.readTechnique(J3MLoader.java:672)
	at com.jme3.material.plugins.J3MLoader.loadFromRoot(J3MLoader.java:774)
	at com.jme3.material.plugins.J3MLoader.load(J3MLoader.java:795)
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
	at com.jme3.material.Material.<init>(Material.java:107)
	at com.jme3.gde.scenecomposer.gizmo.light.LightGizmoFactory.createLightBulb(LightGizmoFactory.java:180)
	at com.jme3.gde.scenecomposer.gizmo.light.LightGizmoFactory.createDirectionalGizmo(LightGizmoFactory.java:93)
	at com.jme3.gde.scenecomposer.gizmo.light.LightGizmoFactory.createGizmo(LightGizmoFactory.java:57)
	at com.jme3.gde.scenecomposer.gizmo.GizmoFactory.createGizmo(GizmoFactory.java:24)
	at com.jme3.gde.scenecomposer.SceneComposerToolController$5.call(SceneComposerToolController.java:304)
	at com.jme3.gde.scenecomposer.SceneComposerToolController$5.call(SceneComposerToolController.java:282)
	at com.jme3.app.AppTask.invoke(AppTask.java:142)
	at com.jme3.app.LegacyApplication.runQueuedTasks(LegacyApplication.java:701)
	at com.jme3.app.LegacyApplication.update(LegacyApplication.java:715)
	at com.jme3.gde.core.scene.SceneApplication.update(SceneApplication.java:292)
	at com.jme3.system.awt.AwtPanelsContext.updateInThread(AwtPanelsContext.java:200)
	at com.jme3.system.awt.AwtPanelsContext.access$100(AwtPanelsContext.java:45)
	at com.jme3.system.awt.AwtPanelsContext$AwtPanelsListener.update(AwtPanelsContext.java:69)
	at com.jme3.system.lwjgl.LwjglOffscreenBuffer.runLoop(LwjglOffscreenBuffer.java:125)
	at com.jme3.system.lwjgl.LwjglOffscreenBuffer.run(LwjglOffscreenBuffer.java:156)
	at java.lang.Thread.run(Thread.java:748)

Edit: I was able to add objects to the scene composer not an hour ago. I probably did something in between that broke it, but I have no idea what. :pensive:

GLSL320 is defined in jme3-core: jmonkeyengine/Caps.java at 8ab3d24e104813745d78603095c4b27f96a05001 · jMonkeyEngine/jmonkeyengine · GitHub

According to “git blame”, it was added in November 2019. Perhaps you switched to an old version of jme3-core?

Perhaps you switched to an old version of jme3-core?

I don’t think so. I’m still using the jme3-core for jme3.4.

SceneComposer is part of the SDK. Since the last stable release of the SDK was v3.3, the SDK you’re using probably wasn’t built with v3.4 of jme3-core.

Ok, I see now. Is there any way to fix it?

Edit: I’ve had v3.4 for several months now. Why does it suddenly break now?

1 Like

Is there any way to fix it?

I’m unsure of the status of the SDK these days. It might be possible to rebuild from source using v3.4 or v3.5 of the Engine. Failing that, you’d need to determine which J3Ms specify GLSL320, edit them using a text editor, and substitute the edited J3Ms into your model.

Personally, I avoid using SceneComposer.

Why does it suddenly break now?

Is this the first time you’ve tried to load a model with a GLSL320 material into SceneComposer? Perhaps you changed a dependency, causing your project to pull in a later version of jme3-core or jme3-effects or jme3-testdata.

1 Like

Did you ever get it fixed, Codex?

I use the SDK and I guess I would first delete and then make a fresh project.
If that still fails then I would just uninstall and do a fresh install of jMonkey.

I broke something one time and tried messing around for a bit and then just reinstalled lol. Haven’t had any issues since :melting_face:

The problem fixed on reboot. I am able to add objects with basically no problem.

2 Likes

SDK / Netbeans sometimes can break files in its memory.

Maybe it was this.

[just related to topic]
Also for other people, if want use higher GLSL its needed to setup renderer:

settings.setRenderer(AppSettings.LWJGL_OPENGL45);

Score! glad you got it working