Since GL commands class are fully encapsulated within GLRenderer class , it is impossible to active a computer shader without change the source code.
Is there any solution guys?
I think you can by creating a material definition file (.j3md) where you can list the shaders you want to load.
More can be found here:
Any example code pls?
I thought we only have TWO shader types.
I learned from this repo. I copied and modified it to fit my game, Depthtris
I know how to use material but I’m talking about the computer shader I haven’t find computer shader in these code. very confused.
any details ?
My bad, a full compute shader that is not rendeing is out of my scope so far.
If you want to hack a compute shader support without modifying the engine , you can use LWJGL (or android gl if you are on android) calls directly.
Well, this way I may break the engine’s resource management system.
I mean the NativeObjectManager.class
Not necessarily, you will have to free the resources you use for your compute shaders manually since they won’t be registered by jme.
Back in 2016, Sebastian Weiss added a support for OpenCL to jme3-core. I’ve never used this feature in a project, but I imagine it includes a mechanism for creating active compute shaders.
A good starting point might be the test apps in jme3-examples/src/main/java/jme3test/opencl.