Appendix G. OpenGL Environment Variable Settings
Prev | Part III. Appendices | Next

## Appendix G. OpenGL Environment Variable Settings

### Full scene antialiasing

Antialiasing is a technique used to smooth the edges of objects in a scene to reduce the jagged "stairstep" effect that sometimes appears. Full-scene antialiasing is supported on GeForce or newer hardware. By setting the appropriate environment variable, you can enable full-scene antialiasing in any OpenGL application on these GPUs.

Several antialiasing methods are available and you can select between them by setting the __GL_FSAA_MODE environment variable appropriately. Note that increasing the number of samples taken during FSAA rendering may decrease performance.

The following tables describe the possible values for __GL_FSAA_MODE and the effects that they have on various NVIDIA GPUs.

__GL_FSAA_MODE | GeForce, GeForce2, Quadro, and Quadro2 Pro
--- | ---
0 | FSAA disabled
1 | FSAA disabled
2 | FSAA disabled
3 | 1.5 x 1.5 Supersampling
4 | 2 x 2 Supersampling
5 | FSAA disabled
6 | FSAA disabled
7 | FSAA disabled

__GL_FSAA_MODE | GeForce4 MX, GeForce4 4xx Go, Quadro4 380,550,580 XGL, and Quadro4 NVS
--- | ---
0 | FSAA disabled
1 | 2x Bilinear Multisampling
2 | 2x Quincunx Multisampling
3 | FSAA disabled
4 | 2 x 2 Supersampling
5 | FSAA disabled
6 | FSAA disabled
7 | FSAA disabled

__GL_FSAA_MODE | GeForce3, Quadro DCC, GeForce4 Ti, GeForce4 4200 Go, and Quadro4 700,750,780,900,980 XGL
--- | ---
0 | FSAA disabled
1 | 2x Bilinear Multisampling
2 | 2x Quincunx Multisampling
3 | FSAA disabled
4 | 4x Bilinear Multisampling
5 | 4x Gaussian Multisampling
6 | 2x Bilinear Multisampling by 4x Supersampling
7 | FSAA disabled

__GL_FSAA_MODE | GeForce FX, GeForce 6xxx, GeForce 7xxx, Quadro FX
--- | ---
0 | FSAA disabled
1 | 2x Bilinear Multisampling
2 | 2x Quincunx Multisampling
3 | FSAA disabled
4 | 4x Bilinear Multisampling
5 | 4x Gaussian Multisampling
6 | 2x Bilinear Multisampling by 4x Supersampling
7 | 4x Bilinear Multisampling by 4x Supersampling
8 | 4x Bilinear Multisampling by 2x Supersampling (available on GeForce FX and later GPUs; not available on Quadro GPUs)

### Anisotropic texture filtering

Automatic anisotropic texture filtering can be enabled by setting the environment variable __GL_LOG_MAX_ANISO. The possible values are:

__GL_LOG_MAX_ANISO | Filtering Type
--- | ---
0 | No anisotropic filtering
1 | 2x anisotropic filtering
2 | 4x anisotropic filtering
3 | 8x anisotropic filtering
4 | 16x anisotropic filtering

4x and greater are only available on GeForce3 or newer GPUs; 16x is only available on GeForce 6800 or newer GPUs.

### Vblank syncing

Setting the environment variable __GL_SYNC_TO_VBLANK to a non-zero value will force glXSwapBuffers to sync to your monitor's vertical refresh (perform a swap only during the vertical blanking period).

When using __GL_SYNC_TO_VBLANK with TwinView, OpenGL can only sync to one of the display devices; this may cause tearing corruption on the display device to which OpenGL is not syncing. You can use the environment variable __GL_SYNC_DISPLAY_DEVICE to specify to which display device OpenGL should sync. You should set this environment variable to the name of a display device; for example "CRT-1". Please look for the line "Connected display device(s):" in your X log file for a list of the display devices present and their names. You may also find it useful to review Appendix I, Configuring TwinView (Configuring Twinview) and the section on Ensuring Identical Mode Timings in Appendix L, Programming Modes.

### Disabling CPU-specific features

Setting the environment variable __GL_FORCE_GENERIC_CPU to a non-zero value will inhibit the use of CPU-specific features such as MMX, SSE, or 3DNOW!. Use of this option may result in performance loss.

### Controlling fork(2) handling behavior

In order to clean up and reinitialize system resources the NVIDIA OpenGL implementation needs to be aware of fork(2) system calls. The mechanism used by the NVIDIA OpenGL implementation to detect fork(2) system calls does not work well on systems using the LinuxThreads implementation of pthreads. For thread safety the NVIDIA OpenGL implementation disables its fork(2) detection on LinuxThreads-based systems. Setting the environment variable __GL_ALWAYS_HANDLE_FORK to a non-zero value will enable fork(2) detection on all systems. Setting the environment variable __GL_ALWAYS_HANDLE_FORK will reduce thread safety on LinuxThreads-based systems. It is strongly recommended to only set the __GL_ALWAYS_HANDLE_FORK environment variable when running single threaded applications that are known to use fork.

Prev | Up | Next
Appendix F. Configuring Low-level Parameters | Home | Appendix H. Configuring AGP