CAT12 fails in MATLAB R2025b due to WebGL/ANGLE OpenGL incompatibility, but works in R2023a
Show older comments
I am running the CAT12 toolbox (2019 version, spm_cat12.m revision ~1417) for T1 MRI segmentation.
In MATLAB R2025b on a machine with NVIDIA GPUs, CAT12 fails during the quality assurance (QA) step with the error:
“One or more output arguments not assigned during call to opengl”
The error originates from cat_vol_qa.m, which internally calls:
QAS.software.opengl = opengl('INFO');
QAS.software.opengldata = opengl('DATA');
As a result, CAT12 does not complete QA and does not write the XML output files, which are required for my downstream processing.
Incedently, the same CAT12 version work correctly on a different machine running MATLAB R2023a on a CPU-only system.
On the failing system (R2025b), rendererinfo reports:
GraphicsRenderer: WebGL
RendererDevice: ANGLE (Direct3D11, NVIDIA GPU)
Attempts to force software OpenGL using MATLAB command window:
opengl('save','software');
opengl('software');
or starting matlab from command line using flags, i.e.
matlab -noopengl
matlab -softwareopengl
do not move MATLAB off the WebGL/ANGLE backend.
Moreso, I cannot simply disable the CAT12 QA step, as the XML files generated during QA are required.
Questions:
- Is there a supported way in MATLAB R2025b to disable WebGL/ANGLE and force a legacy OpenGL?
- Are legacy calls such as opengl('INFO') / opengl('DATA') expected to fail under the newer graphics stack? If so, is there a work around?
Any guidance or recommended migration paths for older toolboxes would be appreciated.
Answers (1)
Steven Lord
on 6 Feb 2026
0 votes
The Release Notes state, among other things: "Calling the opengl (R2025a) function has no effect. To query the graphics renderer, use the rendererinfo (R2025a) function instead." and "The MATLAB startup options -softwareopengl, -nosoftwareopengl, -softwareopenglmesa, and -noopengl have no effect."
You should probably read the full Release Notes entry for more information.
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!