X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=docs%2Fxlibdriver.html;h=e1740cd730e38135a8a3b9b2edab71b8e3d9f969;hb=31de10c4342bc5c21366d14a1266e942b95295a0;hp=d95f4d579c62bded4f291e6e2077397a1f1b8df9;hpb=e3358dea660f5dec53a8be9e38d725f4fd829e14;p=mesa.git diff --git a/docs/xlibdriver.html b/docs/xlibdriver.html index d95f4d579c6..e1740cd730e 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.

@@ -56,19 +64,19 @@ The format of accepted values is: visual-class depth Here are some examples:

-   using csh:
+using csh:
 	% setenv MESA_RGB_VISUAL "TrueColor 8"		// 8-bit TrueColor
 	% setenv MESA_CI_VISUAL "PseudoColor 12"	// 12-bit PseudoColor
 	% setenv MESA_RGB_VISUAL "PseudoColor 8"	// 8-bit PseudoColor
 
-   using bash:
+using bash:
 	$ export MESA_RGB_VISUAL="TrueColor 8"
 	$ export MESA_CI_VISUAL="PseudoColor 12"
 	$ export MESA_RGB_VISUAL="PseudoColor 8"
 
-

Double Buffering

+

Double Buffering

Mesa can use either an X Pixmap or XImage as the back color buffer when in double-buffer mode. @@ -95,11 +103,11 @@ 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 @@ -116,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 @@ -138,14 +146,14 @@ The defaults are all 1.0, effectively disabling gamma correction. Examples:

-	% export MESA_GAMMA="2.3 2.2 2.4"	// separate R,G,B values
-	% export MESA_GAMMA="2.0"		// same gamma for R,G,B
+% export MESA_GAMMA="2.3 2.2 2.4"	// separate R,G,B values
+% 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).

@@ -163,24 +171,23 @@ drawn with glDrawPixels.

-For more information about gamma correction see: - +For more information about gamma correction, see the +Wikipedia article

-

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 SERVER_OVERLAY_VISUALS property:

-	xprop -root | grep SERVER_OVERLAY_VISUALS
+xprop -root | grep SERVER_OVERLAY_VISUALS
 
-

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 @@ -189,9 +196,9 @@ This incurs a small performance penalty.

-

Extensions

+

Extensions

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

GLX_MESA_pixmap_colormap

@@ -200,8 +207,8 @@ The following MESA-specific extensions are implemented in the Xlib driver. This extension adds the GLX function:

-    GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
-                                      Pixmap pixmap, Colormap cmap )
+GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
+                                  Pixmap pixmap, Colormap cmap )
 

It is an alternative to the standard glXCreateGLXPixmap() function. @@ -213,7 +220,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

@@ -236,40 +243,40 @@ deallocate the ancillary buffers by calling glxReleaseBuffersMESA() just before an X window is destroyed. For example:

-         #ifdef GLX_MESA_release_buffers
-            glXReleaseBuffersMESA( dpy, window );
-         #endif
-         XDestroyWindow( dpy, window );
+#ifdef GLX_MESA_release_buffers
+   glXReleaseBuffersMESA( dpy, window );
+#endif
+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)
-   MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
-   MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
-   MESA_GAMMA - gamma correction coefficients (X only)
+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)
+MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
+MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
+MESA_GAMMA - gamma correction coefficients (X only)
 
- +