1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta name="generator" content=
5 "HTML Tidy for FreeBSD (vers 1 September 2005), see www.w3.org">
6 <meta http-equiv="Content-Type" content=
7 "text/html; charset=us-ascii">
8 <title>Chapter 8. Specifying OpenGL Environment Variable
10 <meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
11 <link rel="start" href="index.html" title=
12 "NVIDIA Accelerated FreeBSD Graphics Driver README and Installation Guide">
13 <link rel="up" href="part-01.html" title=
14 "Part I. Installation and Configuration Instructions">
15 <link rel="prev" href="chapter-07.html" title=
16 "Chapter 7. Known Issues">
17 <link rel="next" href="chapter-09.html" title=
18 "Chapter 9. Configuring AGP">
21 <div class="navheader">
22 <table width="100%" summary="Navigation header">
24 <th colspan="3" align="center">Chapter 8. Specifying
25 OpenGL Environment Variable Settings</th>
28 <td width="20%" align="left"><a accesskey="p" href=
29 "chapter-07.html">Prev</a> </td>
30 <th width="60%" align="center">Part I. Installation and
31 Configuration Instructions</th>
32 <td width="20%" align="right"> <a accesskey="n" href=
33 "chapter-09.html">Next</a></td>
37 <div class="chapter" lang="en">
38 <div class="titlepage">
41 <h2 class="title"><a name="openglenvvariables" id=
42 "openglenvvariables"></a>Chapter 8. Specifying OpenGL
43 Environment Variable Settings</h2>
47 <h3>Full scene antialiasing</h3>
48 <p>Antialiasing is a technique used to smooth the edges of objects
49 in a scene to reduce the jagged "stairstep" effect that sometimes
50 appears. By setting the appropriate environment variable, you can
51 enable full-scene antialiasing in any OpenGL application on these
53 <p>Several antialiasing methods are available and you can select
54 between them by setting the __GL_FSAA_MODE environment variable
55 appropriately. Note that increasing the number of samples taken
56 during FSAA rendering may decrease performance.</p>
57 <p>To see the available values for __GL_FSAA_MODE along with their
58 descriptions, run:</p>
60 nvidia-settings --query=fsaa --verbose
62 <p>The __GL_FSAA_MODE environment variable uses the same integer
63 values that are used to configure FSAA through nvidia-settings and
64 the NV-CONTROL X extension.</p>
65 <h3>Anisotropic texture filtering</h3>
66 <p>Automatic anisotropic texture filtering can be enabled by
67 setting the environment variable __GL_LOG_MAX_ANISO. The possible
69 <div class="informaltable">
70 <table summary="(no summary available)" border="0">
76 <th>__GL_LOG_MAX_ANISO</th>
77 <th>Filtering Type</th>
83 <td>No anisotropic filtering</td>
87 <td>2x anisotropic filtering</td>
91 <td>4x anisotropic filtering</td>
95 <td>8x anisotropic filtering</td>
99 <td>16x anisotropic filtering</td>
104 <p>4x and greater are only available on GeForce3 or newer GPUs; 16x
105 is only available on GeForce 6800 or newer GPUs.</p>
106 <h3>Vblank syncing</h3>
107 <p>Setting the environment variable __GL_SYNC_TO_VBLANK to a
108 non-zero value will force glXSwapBuffers to sync to your monitor's
109 vertical refresh (perform a swap only during the vertical blanking
111 <p>When using __GL_SYNC_TO_VBLANK with TwinView, OpenGL can only
112 sync to one of the display devices; this may cause tearing
113 corruption on the display device to which OpenGL is not syncing.
114 You can use the environment variable __GL_SYNC_DISPLAY_DEVICE to
115 specify to which display device OpenGL should sync. You should set
116 this environment variable to the name of a display device; for
117 example "CRT-1". Look for the line "Connected display device(s):"
118 in your X log file for a list of the display devices present and
119 their names. You may also find it useful to review <a href=
120 "chapter-10.html" title=
121 "Chapter 10. Configuring TwinView">Chapter 10,
122 <i>Configuring TwinView</i></a> "Configuring Twinview" and the
123 section on Ensuring Identical Mode Timings in <a href=
124 "chapter-16.html" title=
125 "Chapter 16. Programming Modes">Chapter 16,
126 <i>Programming Modes</i></a>.</p>
127 <h3>Controlling the sorting of OpenGL FBConfigs</h3>
128 <p>The NVIDIA GLX implementation sorts FBConfigs returned by
129 glXChooseFBConfig() as described in the GLX specification. To
130 disable this behavior set __GL_SORT_FBCONFIGS to 0 (zero), then
131 FBConfigs will be returned in the order they were received from the
132 X server. To examine the order in which FBConfigs are returned by
133 the X server run:</p>
135 nvidia-settings --glxinfo
137 <p>This option may be be useful to work around problems in which
138 applications pick an unexpected FBConfig.</p>
139 <h3>OpenGL yield behavior</h3>
140 <p>There are several cases where the NVIDIA OpenGL driver needs to
141 wait for external state to change before continuing. To avoid
142 consuming too much CPU time in these cases, the driver will
143 sometimes yield so the kernel can schedule other processes to run
144 while the driver waits. For example, when waiting for free space in
145 a command buffer, if the free space has not become available after
146 a certain number of iterations, the driver will yield before it
147 continues to loop.</p>
148 <p>By default, the driver calls sched_yield() to do this. However,
149 this can cause the calling process to be scheduled out for a
150 relatively long period of time if there are other, same-priority
151 processes competing for time on the CPU. One example of this is
152 when an OpenGL-based composite manager is moving and repainting a
153 window and the X server is trying to update the window as it moves,
154 which are both CPU-intensive operations.</p>
155 <p>You can use the __GL_YIELD environment variable to work around
156 these scheduling problems. This variable allows the user to specify
157 what the driver should do when it wants to yield. The possible
159 <div class="informaltable">
160 <table summary="(no summary available)" border="0">
172 <td><unset></td>
173 <td>By default, OpenGL will call sched_yield() to yield.</td>
177 <td>OpenGL will never yield.</td>
181 <td>OpenGL will call usleep(0) to yield.</td>
187 <h3>Controlling which OpenGL FBConfigs are available</h3>
188 <p>The NVIDIA GLX implementation will hide FBConfigs that are
189 associated with a 32-bit ARGB visual when the
190 XLIB_SKIP_ARGB_VISUALS environment variable is defined. This
191 matches the behavior of libX11, which will hide those visuals from
192 XGetVisualInfo and XMatchVisualInfo. This environment variable is
193 useful when applications are confused by the presence of these
196 <div class="navfooter">
198 <table width="100%" summary="Navigation footer">
200 <td width="40%" align="left"><a accesskey="p" href=
201 "chapter-07.html">Prev</a> </td>
202 <td width="20%" align="center"><a accesskey="u" href=
203 "part-01.html">Up</a></td>
204 <td width="40%" align="right"> <a accesskey="n" href=
205 "chapter-09.html">Next</a></td>
208 <td width="40%" align="left" valign="top">
209 Chapter 7. Known Issues </td>
210 <td width="20%" align="center"><a accesskey="h" href=
211 "index.html">Home</a></td>
212 <td width="40%" align="right" valign="top">
213 Chapter 9. Configuring AGP</td>