X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=docs%2Fxlibdriver.html;h=d3d8ab4db12906e69c0e2d535c13e0f1b8dcd5fb;hb=c8ff045fdbe4a1a9eddc4c36750a228cfb7770ba;hp=6bb6532533b4bb7926db4e0bae0883bb13f4d1ab;hpb=6e542f11c9cc792123992446900df919d6ea1a83;p=mesa.git diff --git a/docs/xlibdriver.html b/docs/xlibdriver.html index 6bb6532533b..d3d8ab4db12 100644 --- a/docs/xlibdriver.html +++ b/docs/xlibdriver.html @@ -1,12 +1,20 @@ - + + + + + Xlib Software Driver + + + -Xlib Software Driver +
+

The Mesa 3D Graphics Library

+
- + +
- - -

Xlib Software Driver

+

Xlib Software Driver

Mesa's Xlib driver provides an emulation of the GLX interface so that @@ -31,7 +39,7 @@ The unique features of the Xlib driver follows.

-

X Visual Selection

+

X Visual Selection

Mesa supports RGB(A) rendering into almost any X visual type and depth.

@@ -68,29 +76,38 @@ Here are some examples: -

Double Buffering

+

Double Buffering

-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 -MESA_BACK_BUFFER environment variable can override this. The valid -values for MESA_BACK_BUFFER are: Pixmap and XImage -(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 MESA_BACK_BUFFER environment variable can override this. +The valid values for MESA_BACK_BUFFER are: Pixmap and +XImage (only the first letter is checked, case doesn't matter).

-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. +

+

+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.) +

+

Experiment with the MESA_BACK_BUFFER variable to see which is faster for your application.

-

Colormaps

+

Colormaps

When using Mesa directly or with GLX, it's up to the application writer to create a window with an appropriate colormap. The GLUT -toolkit tris to minimize colormap flashing by sharing +toolkit tries to minimize colormap flashing by sharing colormaps when possible. Specifically, if the visual and depth of the window matches that of the root window, the root window's colormap will be shared by the Mesa window. Otherwise, a new, private colormap @@ -107,7 +124,7 @@ significant.

-

Gamma Correction

+

Gamma Correction

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

-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 demos/gamma.c 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).

@@ -155,12 +172,12 @@ drawn with glDrawPixels.

For more information about gamma correction see: - the Gamma FAQ

-

Overlay Planes

+

Overlay Planes

Hardware overlay planes are supported by the Xlib driver. To determine if your X server has overlay support you can test for the @@ -171,7 +188,7 @@ SERVER_OVERLAY_VISUALS property: -

HPCR Dithering

+

HPCR Dithering

If you set the MESA_HPCR_CLEAR environment variable then dithering will be used when clearing the color buffer. This is only applicable @@ -180,7 +197,7 @@ This incurs a small performance penalty.

-

Extensions

+

Extensions

The following MESA-specific extensions are implemented in the Xlib driver.

@@ -204,7 +221,7 @@ See the xdemos/glxpixmap.c file for an example of how to use this extension.

-GLX_MESA_pixmap_colormap specification +GLX_MESA_pixmap_colormap specification

@@ -233,26 +250,26 @@ just before an X window is destroyed. For example: XDestroyWindow( dpy, window );

-GLX_MESA_release_buffers specification +GLX_MESA_release_buffers specification

This extension was added in Mesa 2.0.

-

GLX_MESA_copy_sub_buffer

+

GLX_MESA_copy_sub_buffer

This extension adds the glXCopySubBufferMESA() function. It works like glXSwapBuffers() but only copies a sub-region of the window instead of the whole window.

-GLX_MESA_copy_sub_buffer specification +GLX_MESA_copy_sub_buffer specification

This extension was added in Mesa 2.6

-

Summary of X-related environment variables

+

Summary of X-related environment variables

    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)
@@ -261,6 +278,6 @@ This extension was added in Mesa 2.6
    MESA_GAMMA - gamma correction coefficients (X only)
 
- +