4 Mesa's off-screen interface is used for rendering into user-allocated
5 memory without any sort of window system or operating system
6 dependencies. That is, the GL_FRONT colorbuffer is actually a buffer in
7 main memory, rather than a window on your display.
9 The OSMesa API provides three basic functions for making off-screen
10 renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and
11 OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for more
12 information about the API functions.
14 The OSMesa interface may be used with any of three software renderers:
16 #. llvmpipe - this is the high-performance Gallium LLVM driver
17 #. softpipe - this it the reference Gallium software driver
18 #. swrast - this is the legacy Mesa software rasterizer
20 There are several examples of OSMesa in the mesa/demos repository.
25 Configure and build Mesa with something like:
29 meson builddir -Dosmesa=gallium -Dgallium-drivers=swrast -Ddri-drivers=[] -Dvulkan-drivers=[] -Dprefix=$PWD/builddir/install
30 ninja -C builddir install
32 Make sure you have LLVM installed first if you want to use the llvmpipe
35 When the build is complete you should find:
39 $PWD/builddir/install/lib/libOSMesa.so (swrast-based OSMesa)
40 $PWD/builddir/install/lib/gallium/libOSMsea.so (gallium-based OSMesa)
42 Set your LD_LIBRARY_PATH to point to $PWD/builddir/install to use the
45 When you link your application, link with -lOSMesa