[Mesa-dev] [PATCH 7/7] docs: rewrite the OSMesa info / instructions
brianp at vmware.com
Mon Mar 11 17:35:31 PDT 2013
docs/osmesa.html | 65 ++++++++++++++++++++---------------------------------
1 files changed, 25 insertions(+), 40 deletions(-)
diff --git a/docs/osmesa.html b/docs/osmesa.html
index b0609cf..8487545 100644
@@ -18,77 +18,62 @@
-Mesa's off-screen rendering interface is used for rendering into
-user-allocated blocks of memory.
+Mesa's off-screen interface is used for rendering into user-allocated memory
+without any sort of window system or operating system dependencies.
That is, the GL_FRONT colorbuffer is actually a buffer in main memory,
rather than a window on your display.
-There are no window system or operating system dependencies.
-One potential application is to use Mesa as an off-line, batch-style renderer.
-The <b>OSMesa</b> API provides three basic functions for making off-screen
+The OSMesa API provides three basic functions for making off-screen
renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and
OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for
more information about the API functions.
-There are several examples of OSMesa in the mesa/demos repository.
+The OSMesa interface may be used with any of three software renderers:
+<li>llvmpipe - this is the high-performance Gallium LLVM driver
+<li>softpipe - this it the reference Gallium software driver
+<li>swrast - this is the legacy Mesa software rasterizer
-<h2>Deep color channels</h2>
-For some applications 8-bit color channels don't have sufficient
-OSMesa supports 16-bit and 32-bit color channels through the OSMesa interface.
-When using 16-bit channels, channels are GLushorts and RGBA pixels occupy
-When using 32-bit channels, channels are GLfloats and RGBA pixels occupy
+There are several examples of OSMesa in the mesa/demos repository.
-Before version 6.5.1, Mesa had to be recompiled to support exactly
-one of 8, 16 or 32-bit channels.
-With Mesa 6.5.1, Mesa can be compiled for either 8, 16 or 32-bit channels
-and render into any of the smaller size channels.
-For example, if Mesa's compiled for 32-bit channels, you can also render
-16 and 8-bit channel images.
-To build Mesa/OSMesa for 16 and 8-bit color channel support:
+Configure and build Mesa with something like:
- make realclean
- make linux-osmesa16
+configure --enable-osmesa --disable-driglx-direct --disable-dri --with-gallium-drivers=swrast
-To build Mesa/OSMesa for 32, 16 and 8-bit color channel support:
- make realclean
- make linux-osmesa32
+Make sure you have LLVM installed first if you want to use the llvmpipe driver.
-You'll wind up with a library named libOSMesa16.so or libOSMesa32.so.
-Otherwise, most Mesa configurations build an 8-bit/channel libOSMesa.so library
+When the build is complete you should find:
+lib/libOSMesa.so (swrast-based OSMesa)
+lib/gallium/libOSMsea.so (gallium-based OSMesa)
-If performance is important, compile Mesa for the channel size you're
-most interested in.
+Set your LD_LIBRARY_PATH to point to one directory or the other to select
+the library you want to use.
-If you need to compile on a non-Linux platform, copy Mesa/configs/linux-osmesa16
-to a new config file and edit it as needed. Then, add the new config name to
-the top-level Makefile. Send a patch to the Mesa developers too, if you're
+When you link your application, link with -lOSMesa
More information about the mesa-dev