EGL with Matlab 2021a

Since VirtualGL can use EGL to not require Xorg server running I seem to have issues with Matlab 2021a where the -nosoftwareopengl option to vglrun e.g.

$ export VGL_DISPLAY=/dev/dri/card1
$ vglrun matlab -nosoftwareopengl

Seems to produce an error when using OpenGL e.g. in Matlab

rendererinfo(gca)

Will produce an error and have:

com.jogamp.opengl.GLException: Caught GLException: AWT-EventQueue-0: createImpl ARB n/a but required, profile > GL2 requested (OpenGL >= 3.1). Requested: GLProfile[GL4bc/GL4bc.hw], current: 4.6 (Compat profile, compat[ES2, ES3, ES31], FBO, hardware) - 4.6.0 NVIDIA 495.29.05

Which suggests Matlab doesn’t like the OpenGL profile. Am I asking for too much? Has anyone got this to work - there is a later version of VirtualGL just released but I couldn’t spot anything in release notes to help fix this.

Using -softwareopengl seems to work okay.