* 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 the 2D X server does \
		not support transparent overlays.  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 redirect the rendering of transparent overlays, since \
		those cannot be rendered in a Pbuffer.  Thus, in order to use transparent \
		overlays, the 2D X server must be able to render them, which is rarely \
		the case for X proxies (see {ref prefix="Section ": overlays} for more \
		details.)  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 in VNC. \
	|
| 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. \
	|
| 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. \
	|
| 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''. \
	|
| 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. \
	|
| Google Chrome/Chromium | v31 to v54 | Linux \
	| ''vglrun google-chrome --disable-gpu-sandbox''{nl} \
		or{nl} \
		''vglrun chromium --disable-gpu-sandbox'' \
	| By default, Chrome/Chromium uses a separate process to perform 3D \
		rendering (WebGL), and for reasons that are not yet fully understood, \
		this breaks VirtualGL.  The ''--disable-gpu-sandbox'' option causes 3D \
		rendering to be performed within the browser process. \
	|
| Google Chrome/Chromium | v55 and later | Linux \
	| Set the ''VGL_DEFAULTFBCONFIG'' environment variable to \
		''GLX_ALPHA_SIZE,8'' prior to launching the application with ''vglrun'' \
	| This is not necessary with all OpenGL implementations but is known to be \
		necessary with recent versions of nVidia's proprietary OpenGL stack. \
		Chrome iterates over all of the available visuals on the 2D X server, \
		calling ''glXGetConfig()'' for each in an attempt to find a GLX visual \
		with alpha capabilities.  Unfortunately, this behavior foils VirtualGL's \
		visual matching system, for reasons described in \
		{ref prefix="Section ": VGL_DEFAULTFBCONFIG}. \
	|
| 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. \
	|
| Heretic II | All | Linux \
	| ''vglrun heretic2 +set vid_ref glx'' \
	| {:} \
	|
| 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''. \
	|
| JOGL | 2.3.x and later | All \
	| Pass ''-Djogl.disable.opengles'' to ''java'' when launching the \
		application that uses JOGL, or set \
		''JAVA_TOOL_OPTIONS=-Djogl.disable.opengles'' in the environment. \
	| Recent versions of JOGL support using OpenGL ES with X11, which \
		necessitates using EGL with X11.  In this mode of operation, EGL behaves \
		like a feature-limited implementation of GLX, and supporting that use \
		case properly will require implementing an EGL/X11 interposer that \
		duplicates much of the functionality of VirtualGL's existing GLX \
		interposer. \
		{nl}{nl} \
		If OpenGL ES is not disabled in JOGL, then JOGL will throw an error when \
		used with VirtualGL: "GLException: Failed to created/initialize EGL \
		display incl. fallback default: native 0x0, error 0x3008/0x3000." \
	|
| Mathematica | v7 | Linux \
	| Set the ''VGL_ALLOWINDIRECT'' environment variable to ''1'' prior to \
		launching the application with ''vglrun'' \
	| 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.6/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. \
	|
| 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. \
	|
