st/mesa: merge st_ChooseTextureFormat_renderable() into st_ChooseTextureFormat()
[mesa.git] / docs / xlibdriver.html
index 7734542dcb9137d79c91ccdf2936893e5096782c..6b7b02903a1563df725c23bd02be10efad37523f 100644 (file)
@@ -1,12 +1,20 @@
-<HTML>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8">
+  <title>Xlib Software Driver</title>
+  <link rel="stylesheet" type="text/css" href="mesa.css">
+</head>
+<body>
 
-<TITLE>Xlib Software Driver</TITLE>
+<div class="header">
+  <h1>The Mesa 3D Graphics Library</h1>
+</div>
 
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
+<iframe src="contents.html"></iframe>
+<div class="content">
 
-<BODY>
-
-<H1>Xlib Software Driver</H1>
+<h1>Xlib Software Driver</h1>
 
 <p>
 Mesa's Xlib driver provides an emulation of the GLX interface so that
@@ -22,7 +30,7 @@ software-only drivers.
 
 <p>
 Since the Xlib driver <em>emulates</em> the GLX extension, it's not
-totally conformance with a true GLX implementation.
+totally conformant with a true GLX implementation.
 The differences are fairly obscure, however.
 </p>
 
@@ -31,7 +39,7 @@ The unique features of the Xlib driver follows.
 </p>
 
 
-<H2>X Display Modes</H2>
+<h2>X Visual Selection</h2>
 <p>
 Mesa supports RGB(A) rendering into almost any X visual type and depth.
 </p>
@@ -68,25 +76,34 @@ Here are some examples:
 </pre>
 
 
-<H2>Double buffering</H2>
+<h2>Double Buffering</h2>
 <p>
-Mesa can use either an X Pixmap or XImage as the backbuffer when in
-double buffer mode.  Using GLX, the default is to use an XImage.  The
-<b>MESA_BACK_BUFFER</b> environment variable can override this.  The valid
-values for <b>MESA_BACK_BUFFER</b> are:  <b>Pixmap</b> and <b>XImage</b>
-(only the first letter is checked, case doesn't matter).
+Mesa can use either an X Pixmap or XImage as the back color buffer when in
+double-buffer mode.
+The default is to use an XImage.
+The <b>MESA_BACK_BUFFER</b> environment variable can override this.
+The valid values for <b>MESA_BACK_BUFFER</b> are:  <b>Pixmap</b> and
+<b>XImage</b> (only the first letter is checked, case doesn't matter).
 </p>
 
 <p>
-A pixmap is faster when drawing simple lines and polygons while an
-XImage is faster when Mesa has to do pixel-by-pixel rendering.  If you
-need depth buffering the XImage will almost surely be faster.
+Using XImage is almost always faster than a Pixmap since it resides in
+the application's address space.
+When glXSwapBuffers() is called, XPutImage() or XShmPutImage() is used
+to transfer the XImage to the on-screen window.
+</p>
+<p>
+A Pixmap may be faster when doing remote rendering of a simple scene.
+Some OpenGL features will be very slow with a Pixmap (for example, blending
+will require a round-trip message for pixel readback.)
+</p>
+<p>
 Experiment with the MESA_BACK_BUFFER variable to see which is faster
 for your application.
 </p>
 
 
-<H2>Colormaps</H2>
+<h2>Colormaps</h2>
 <p>
 When using Mesa directly or with GLX, it's up to the application
 writer to create a window with an appropriate colormap.  The GLUT
@@ -107,7 +124,7 @@ significant.
 </p>
 
 
-<H2>Gamma correction</H2>
+<h2>Gamma Correction</h2>
 <p>
 To compensate for the nonlinear relationship between pixel values
 and displayed intensities, there is a gamma correction feature in
@@ -133,10 +150,10 @@ Examples:
        % export MESA_GAMMA="2.0"               // same gamma for R,G,B
 </pre>
 <p>
-The progs/demos/gamma.c program may help you to determine reasonable gamma
-value for your display.  With correct gamma values, the color intensities
-displayed in the top row (drawn by dithering) should nearly match those
-in the bottom row (drawn as grays).
+The <code>demos/gamma.c</code> program in mesa/demos repository may help
+you to determine reasonable gamma value for your display.  With correct
+gamma values, the color intensities displayed in the top row (drawn by
+dithering) should nearly match those in the bottom row (drawn as grays).
 </p>
 
 <p>
@@ -155,12 +172,12 @@ drawn with glDrawPixels.
 
 <p>
 For more information about gamma correction see:
-<a href="http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html"
+<a href="http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html">
 the Gamma FAQ</a>
 </p>
 
 
-<H2>Overlay Planes</H2>
+<h2>Overlay Planes</h2>
 <p>
 Hardware overlay planes are supported by the Xlib driver.  To
 determine if your X server has overlay support you can test for the
@@ -171,15 +188,16 @@ SERVER_OVERLAY_VISUALS property:
 </pre>
 
 
-<H2>HPCR glClear(GL_COLOR_BUFFER_BIT) dithering</H2>
+<h2>HPCR Dithering</h2>
 <p>
 If you set the <b>MESA_HPCR_CLEAR</b> environment variable then dithering
 will be used when clearing the color buffer.  This is only applicable
 to HP systems with the HPCR (Color Recovery) feature.
+This incurs a small performance penalty.
 </p>
 
 
-<H2>Extensions</H2>
+<h2>Extensions</h2>
 <p>
 The following MESA-specific extensions are implemented in the Xlib driver.
 </p>
@@ -238,7 +256,7 @@ just before an X window is destroyed.  For example:
 This extension was added in Mesa 2.0.
 </p>
 
-<H3>GLX_MESA_copy_sub_buffer</H3>
+<h3>GLX_MESA_copy_sub_buffer</h3>
 <p>
 This extension adds the glXCopySubBufferMESA() function.  It works
 like glXSwapBuffers() but only copies a sub-region of the window
@@ -251,7 +269,7 @@ instead of the whole window.
 This extension was added in Mesa 2.6
 </p>
 
-<h2>Summary of X-related environment variables</H2>
+<h2>Summary of X-related environment variables</h2>
 <pre>
    MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only)
    MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only)
@@ -260,6 +278,6 @@ This extension was added in Mesa 2.6
    MESA_GAMMA - gamma correction coefficients (X only)
 </pre>
 
-
+</div>
 </body>
 </html>