3 <TITLE>Off-screen Rendering
</TITLE>
5 <link rel=
"stylesheet" type=
"text/css" href=
"mesa.css"></head>
9 <H1>Off-screen Rendering
</H1>
13 Mesa's off-screen rendering interface is used for rendering into
14 user-allocated blocks of memory.
15 That is, the GL_FRONT colorbuffer is actually a buffer in main memory,
16 rather than a window on your display.
17 There are no window system or operating system dependencies.
18 One potential application is to use Mesa as an off-line, batch-style renderer.
22 The
<B>OSMesa
</B> API provides three basic functions for making off-screen
23 renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and
24 OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for
25 more information about the API functions.
29 There are several examples of OSMesa in the
<code>progs/osdemos/
</code>
34 <H2>Deep color channels
</H2>
37 For some applications
8-bit color channels don't have sufficient
39 OSMesa supports
16-bit and
32-bit color channels through the OSMesa interface.
40 When using
16-bit channels, channels are GLushorts and RGBA pixels occupy
42 When using
32-bit channels, channels are GLfloats and RGBA pixels occupy
47 Before version
6.5.1, Mesa had to be recompiled to support exactly
48 one of
8,
16 or
32-bit channels.
49 With Mesa
6.5.1, Mesa can be compiled for either
8,
16 or
32-bit channels
50 and render into any of the smaller size channels.
51 For example, if Mesa's compiled for
32-bit channels, you can also render
52 16 and
8-bit channel images.
56 To build Mesa/OSMesa for
16 and
8-bit color channel support:
63 To build Mesa/OSMesa for
32,
16 and
8-bit color channel support:
70 You'll wind up with a library named libOSMesa16.so or libOSMesa32.so.
71 Otherwise, most Mesa configurations build an
8-bit/channel libOSMesa.so library
76 If performance is important, compile Mesa for the channel size you're
81 If you need to compile on a non-Linux platform, copy Mesa/configs/linux-osmesa16
82 to a new config file and edit it as needed. Then, add the new config name to
83 the top-level Makefile. Send a patch to the Mesa developers too, if you're