I use shape key in blender
and export gltf model
then use this model on android (Report this mistake)
but it can be used on desktop app
this is my model filegltf_model
The line that throws the exception is accessing the array that keeps track of currently bound VertexBuffers.
Jme does not use explicit attribute locations and instead queries the driver for the location of the attributes which is completly driver dependant.
You seem to use say an Adreno 500/600 in you mobile device (a graphics card that supports more than 16 vertex attributes) while you might use an NVIDIA card in your desktop (anyway a card that supports only 16 attributes)
now jme hardcodes the size of the array that is used to keep track of currently bound attributes to 16 which is the minimum required by the OpenGL spec
But on a graphics card that supports more than 16 vertex attributes, when also using driver-assigned locations, might result in attribute locations with an index > 15, which produces this error
A solution would be to query the supported amount of vertex attributes in the GLRenderer around where the caps are checked and create the RenderContext based on the returned value
EDIT: screw that, i just realized, that limit is already queried in the GLRenderer specifically for the MorphTargets in order to check how many can be used simultaneously and how many need to be merged. I was already wondering what reason the driver would have to assign a higher index than needed, especially since AMD card support 32 vertex attributes for a long time already and that problem has not yet been reported. While your desktop device reports a supported maximum of 16 vertex buffers, meaning some number of morph targets will be merged, the mobile device reports a maximum of say 32 vertex buffers, which is why it tries to actually use up to that many vertex buffers. now the fact of the hardcoded array size of 16 is still true and still the reason for the exception. Might that be the case?
If you are using an emulator, what is version of openGL, usually emulators’ default openGL is GLES2 which may affect the constant MAX_VERTEX_ATTRIBS.