
There's still a few in here, but those docs are already so out of date that it probably makes more sense to delete them. Such as the GLES docs which still claim we only support 1.1 and 2.0, with no mention of 3.x at all. v2: - Add docs for testing back end (Eric Engestrom) - Drop more autootols references - meson is now required not recommended - Add $PWD Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Acked-by: Matt Turner <mattst88@gmail.com>
81 lines
2.0 KiB
HTML
81 lines
2.0 KiB
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>Off-screen Rendering</title>
|
|
<link rel="stylesheet" type="text/css" href="mesa.css">
|
|
</head>
|
|
<body>
|
|
|
|
<div class="header">
|
|
<h1>The Mesa 3D Graphics Library</h1>
|
|
</div>
|
|
|
|
<iframe src="contents.html"></iframe>
|
|
<div class="content">
|
|
|
|
<h1>Off-screen Rendering</h1>
|
|
|
|
|
|
<p>
|
|
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.
|
|
</p>
|
|
|
|
<p>
|
|
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.
|
|
</p>
|
|
|
|
<p>
|
|
The OSMesa interface may be used with any of three software renderers:
|
|
</p>
|
|
<ol>
|
|
<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
|
|
</ol>
|
|
|
|
|
|
<p>
|
|
There are several examples of OSMesa in the mesa/demos repository.
|
|
</p>
|
|
|
|
<h1>Building OSMesa</h1>
|
|
|
|
<p>
|
|
Configure and build Mesa with something like:
|
|
|
|
<pre>
|
|
meson builddir -Dosmesa=gallium -Dgallium-drivers=swrast -Ddri-drivers= -Dvulkan-drivers= -Dprefix=$PWD/builddir/install
|
|
ninja -C builddir install
|
|
</pre>
|
|
|
|
<p>
|
|
Make sure you have LLVM installed first if you want to use the llvmpipe driver.
|
|
</p>
|
|
|
|
<p>
|
|
When the build is complete you should find:
|
|
</p>
|
|
<pre>
|
|
$PWD/builddir/install/lib/libOSMesa.so (swrast-based OSMesa)
|
|
$PWD/builddir/install/lib/gallium/libOSMsea.so (gallium-based OSMesa)
|
|
</pre>
|
|
|
|
<p>
|
|
Set your LD_LIBRARY_PATH to point to $PWD/builddir/install to use the libraries
|
|
</p>
|
|
|
|
<p>
|
|
When you link your application, link with -lOSMesa
|
|
</p>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|