* Other Application Recipes
{anchor: Application_Recipes}

|| 3D Application || Versions Known to Require Recipe || Platform \
	|| Recipe \
	|| Notes \
	||
| Abaqus | v6 | Linux \
	| It is necessary to add \
		{nl}{nl} \
		''import os''{nl} \
		''os.environ['ABAQUS_EMULATE_OVERLAYS'] = "1"'' \
		{nl}{nl} \
		to \
		{file: __abaqus-install-dir__/__abaqus-version__/site/abaqus_v6.env} \
		to make Abaqus v6 work properly with VirtualGL.  If this is not done, \
		then the application may fail to launch, it may fail to display any \
		OpenGL-rendered pixels, or those pixels may become corrupted whenever \
		other windows obscure them. \
	| VirtualGL does not support transparent overlays, since those cannot be \
		rendered in an off-screen buffer.  Setting ''ABAQUS_EMULATE_OVERLAYS'' to \
		''1'' causes the application to emulate overlay rendering instead of \
		using actual transparent overlays.  This workaround is known to be \
		necessary when running Abaqus 6.9 and 6.10. \
	|
| Abaqus | v6 | Linux \
	| {pcode: vglrun -nodl __abaqus-path__/abaqus} \
	| User reports indicate that Abaqus 6.9 will not work properly if \
		VirtualGL's ''dlopen()'' interposer ({file: libdlfaker.so}) is preloaded \
		into it.  This may be true for other versions of Abaqus as well. \
	|
| Cadence Allegro | v16.5 | Linux \
	| ''vglrun +sync allegro'' \
	| Allegro relies on mixed X11/OpenGL rendering, and thus certain features \
		(specifically the ''pcb_cursor_infinite'' cursor style) do not work \
		properly unless ''VGL_SYNC'' is enabled.  If ''VGL_SYNC'' is not enabled, \
		then the crosshairs may remain on the screen.  Since ''VGL_SYNC'' \
		automatically enables the X11 transport and disables frame spoiling, it \
		is highly recommended that you use an X proxy when ''VGL_SYNC'' is \
		enabled.  See {ref prefix="Section ": VGL_SYNC} for further information. \
	|
| Animator | v4 | Linux \
	| Comment out the line that reads \
		{nl}{nl} \
		''unsetenv LD_PRELOAD'' \
		{nl}{nl} \
		in the ''a4'' script, then launch Animator 4 using \
		{nl}{nl} \
		''vglrun -ge a4'' \
		{nl}{nl} \
	| When the ''a4'' script unsets ''LD_PRELOAD'', this prevents VirtualGL \
		from being loaded into the application.  Animator 4 additionally checks \
		the value of ''LD_PRELOAD'' and attempts to unset it from inside \
		the application.  Using ''vglrun -ge'' to launch the application fools \
		Animator 4 into thinking that ''LD_PRELOAD'' is unset. \
	|
| ANSA | v12.1.0 | Linux \
	| Add \
		{nl}{nl} \
		''LD_PRELOAD_SAVE=$LD_PRELOAD''{nl} \
		''export LD_PRELOAD='' \
		{nl}{nl} \
		to the top of the ''ansa.sh'' script, then add \
		{nl}{nl} \
		''export LD_PRELOAD=$LD_PRELOAD_SAVE'' \
		{nl}{nl} \
		just prior to the ''${ANSA_EXEC_DIR}bin/ansa_linux${ext2}'' line. \
	| The ANSA startup script directly invokes ''/lib/libc.so.6'' to query \
		the glibc version.  Since the VirtualGL faker libraries depend on libc, \
		preloading VirtualGL when directly invoking ''libc.so.6'' creates an \
		infinite loop.  Thus, it is necessary to disable the preloading of \
		VirtualGL in the application script and then re-enable it prior to \
		launching the actual application. \
	|
| AutoForm | v4.0x | All \
	| {pcode: vglrun +sync xaf\___version__} \
	| AutoForm relies on mixed X11/OpenGL rendering, and thus certain features \
		(particularly the "Dynamic Section" dialog and "Export Image" feature) do \
		not work properly unless ''VGL_SYNC'' is enabled.  Since ''VGL_SYNC'' \
		automatically enables the X11 transport and disables frame spoiling, it \
		is highly recommended that you use an X proxy when ''VGL_SYNC'' is \
		enabled.  See {ref prefix="Section ": VGL_SYNC} for further information. \
	|
| Cedega | v6.0.x | Linux \
	| Add \
		{nl}{nl} \
		''export LD_PRELOAD=libvglfaker.so'' \
		{nl}{nl} \
		to the top of {file: ~/.cedega/.winex_ver/winex-__version__/bin/winex3}, \
		then run Cedega as you would normally (without ''vglrun''.)  Since \
		''vglrun'' is not being used, it is necessary to use environment \
		variables or the VirtualGL Configuration dialog to modify VirtualGL's \
		configuration. \
	| The actual binary (WineX) that uses OpenGL is buried beneath several \
		layers of Python and shell scripts.  The ''LD_PRELOAD'' variable does not \
		get propagated down from the initial shell that invoked ''vglrun''. \
	|
| Google Chrome/Chromium | v85 through v128 | Linux \
	| ''vglrun google-chrome --in-process-gpu --use-gl=egl''{nl} \
		or{nl} \
		''vglrun chromium --in-process-gpu --use-gl=egl'' \
	| The ''--in-process-gpu'' option causes Chrome/Chromium to use a thread \
		rather than a separate process for 3D rendering, which prevents it from \
		complaining about the X11 function calls that the VirtualGL Faker makes. \
		The ''--use-gl=egl'' option forces Chrome/Chromium to use desktop OpenGL \
		rather than ANGLE, which works around an issue whereby, when using ANGLE, \
		Chrome/Chromium assumes that every X visual has an EGL framebuffer \
		configuration associated with it. \
		{nl}{nl} \
		As of this writing, there are no known workarounds that allow Chrome v129 \
		and later to be used with VirtualGL. |
| Compiz | All | Linux \
	| Set the ''VGL_WM'' environment variable to ''1'' prior to launching the \
		window manager with ''vglrun'', or pass an argument of ''+wm'' to \
		''vglrun''. \
	| See {ref prefix="Section ": VGL_WM} for further information. \
	|
| Mozilla Firefox | v93 and earlier | Linux \
	| Set the ''MOZ_DISABLE_CONTENT_SANDBOX'' environment variable to ''1'' \
		prior to launching the application with ''vglrun'' \
	| The content sandbox in Firefox v93 and earlier prevents VirtualGL from \
		opening an X display connection to the 3D X server, which causes WebGL \
		tabs to crash when using the GLX back end.  Some users have reported that \
		disabling the content sandbox is also necessary when using the EGL back \
		end with certain GPUs. \
	|
| ANSYS Fluent (when launched from ANSYS Workbench) | v16 and later | Linux \
	| Set the ''FLUENT_WB_OPTIONAL_ARGS'' environment variable to \
		''-driver opengl'' and the ''CORTEX_PRE'' environment variable to \
		''/opt/VirtualGL/bin/vglrun''. \
	| If these environment variables are not set, Fluent will use software \
		OpenGL when launched from ANSYS Workbench. \
	|
| Heretic II | All | Linux \
	| ''vglrun heretic2 +set vid_ref glx'' \
	| {:} \
	|
| ANSYS HFSS, ANSYS ICEM CFD, Roxar RMS | All | Linux \
	| Set the ''VGL_SPOILLAST'' environment variable to ''0'' prior to \
		launching the application with ''vglrun'' \
	| These applications draw node highlighting and/or rubber banding directly \
		to the front buffer.  In order for these front buffer operations to be \
		displayed properly, it is necessary to use the "spoil first" frame \
		spoiling algorithm whenever the application calls ''glFlush()''.  See \
		{ref prefix="Section ": VGL_SPOILLAST} for further information. \
	|
| Intel OpenCL ICD | All | Linux \
	| {pcode: vglrun -ld __path-to-Intel-OpenCL-libs__ __application__} \
	| The Intel OpenCL installable client driver (ICD) is linked with a \
		run-time library search path (rpath) of ''$ORIGIN'', which would normally \
		have the same effect as adding the directory in which the ICD is \
		installed (default: {file: /opt/intel/opencl/lib64} on 64-bit systems) to \
		''LD_LIBRARY_PATH''.  However, when VirtualGL is interposing the \
		''dlopen()'' function (which it does by default), this causes the actual \
		''dlopen()'' system calls to come from {file: libdlfaker.so}, so \
		''$ORIGIN'' will resolve to the directory in which the VirtualGL faker \
		libraries are installed.  This causes the ''dlopen()'' calls within the \
		Intel ICD to fail, and because the ICD apparently does not check the \
		return value of those calls, a segfault occurs.  The workaround is simply \
		to add the Intel ICD library path to ''LD_LIBRARY_PATH'', which is most \
		easily accomplished with ''vglrun -ld''. \
	|
| Mathematica | v7 | Linux \
	| Set the ''VGL_ALLOWINDIRECT'' environment variable to ''1'' prior to \
		launching the application with ''vglrun''.  Note that \
		''VGL_ALLOWINDIRECT'' requires the GLX back end. \
	| Mathematica 7 will not draw the axis numbers on 3D charts correctly \
		unless it is allowed to create an indirect OpenGL context.  See \
		{ref prefix="Section ": VGL_ALLOWINDIRECT} for further information. \
	|
| MATLAB | All | Linux \
	| {pcode: vglrun /usr/local/MATLAB/__version__/bin/matlab \\}{nl} \
		''       -nosoftwareopengl'' \
	| MATLAB will automatically use its built-in (unaccelerated) OpenGL \
		implementation if it detects that it is running in a remote display \
		environment.  More specifically, it will always enable software OpenGL \
		if the X server has an X extension called ''VNC-EXTENSION'', which is \
		the case with TurboVNC, TigerVNC, and RealVNC. \
	|
| PyTorch | All | Linux \
	| {pcode: vglrun -ld __path-to-PyTorch-libs__ __application__}{nl} \
		or{nl} \
		{pcode: vglrun -nodl __application__}{nl} \
	| The PyTorch module and its dependency libraries are linked with a \
		run-time library search path (rpath) of ''$ORIGIN'', which would normally \
		have the same effect as adding the directory in which the module is \
		installed (for instance, \
		{file: /usr/local/lib64/python3.9/site-packages/torch/lib}) to \
		''LD_LIBRARY_PATH''.  However, when VirtualGL is interposing the \
		''dlopen()'' function (which it does by default), this causes the actual \
		''dlopen()'' system calls to come from {file: libdlfaker.so}, so \
		''$ORIGIN'' will resolve to the directory in which the VirtualGL faker \
		libraries are installed.  This causes the ''dlopen()'' calls within the \
		PyTorch module to fail.  The workaround is to add the PyTorch module path \
		to ''LD_LIBRARY_PATH'', which is most easily accomplished with \
		''vglrun -ld'', or to disable VirtualGL's ''dlopen()'' interposer. \
		\
		{note: If you are using CUDA with PyTorch, then it may also be necessary \
		to add one or more of the CUDA module paths (for instance, \
		{file: /usr/local/lib64/python3.9/site-packages/nvidia/cudnn/lib}) to \
		''LD_LIBRARY_PATH''.} \
	|
| Siemens Simcenter STAR-CCM+ | v19.xx | Linux \
	| {pcode: vglrun __path-to-STAR-CCM+-scripts__/starccm+ \\}{nl} \
		''       -clientldpreload libdlfaker.so:libvglfaker.so'' \
	| Failing to pass the aforementioned arguments to the STAR-CCM+ startup \
		script prevents VirtualGL from being loaded into the application, \
		resulting in unaccelerated OpenGL and error messages such as "ERROR: in \
		isDisplayExcluded-- XX: Unexpected NULL condition" \
	|
| Tecplot 360 | 2011 and earlier | Linux \
	| Set the ''VGL_GLFLUSHTRIGGER'' environment variable to ''0'' prior to \
		launching the application with ''vglrun'' \
	| When running Tecplot 360 with VirtualGL in a high-performance X proxy, \
		flashing artifacts will be produced when the user zooms/pans/rotates the \
		scene, unless VirtualGL is instructed not to use ''glFlush()'' as a \
		frame trigger.  This has been fixed in Tecplot 2012 and later.  See \
		{ref prefix="Section ": VGL_GLFLUSHTRIGGER} for further information. \
	|
| Unity Hub / Unity Editor | v3.7.0 / v2021.X and later | Linux \
	| ''vglrun unityhub --use-gl=egl''{nl} \
	| The ''--use-gl=egl'' option forces Unity to use desktop OpenGL rather \
		than ANGLE, which works around an issue whereby, when using ANGLE, Unity \
		assumes that every X visual has an EGL framebuffer configuration \
		associated with it. \
	|
