head 1.2; access; symbols netbsd-8-3-RELEASE:1.1.1.3 netbsd-9-4-RELEASE:1.1.1.3 netbsd-9-3-RELEASE:1.1.1.3 netbsd-9-2-RELEASE:1.1.1.3 netbsd-9-1-RELEASE:1.1.1.3 netbsd-8-2-RELEASE:1.1.1.3 netbsd-9-0-RELEASE:1.1.1.3 netbsd-9-0-RC2:1.1.1.3 netbsd-9-0-RC1:1.1.1.3 mesalib-19-1-7:1.1.1.4 netbsd-9:1.1.1.3.0.4 netbsd-9-base:1.1.1.3 mesa-18-3-6:1.1.1.3 netbsd-8-1-RELEASE:1.1.1.3 netbsd-8-1-RC1:1.1.1.3 mesa-18-3-4:1.1.1.3 netbsd-7-2-RELEASE:1.1.1.2.10.1 netbsd-8-0-RELEASE:1.1.1.3 netbsd-8-0-RC2:1.1.1.3 netbsd-8-0-RC1:1.1.1.3 netbsd-7-1-2-RELEASE:1.1.1.2.10.1 netbsd-7-1-1-RELEASE:1.1.1.2.10.1 netbsd-8:1.1.1.3.0.2 netbsd-8-base:1.1.1.3 netbsd-7-1:1.1.1.2.10.1.0.4 netbsd-7-1-RELEASE:1.1.1.2.10.1 netbsd-7-1-RC2:1.1.1.2.10.1 netbsd-7-1-RC1:1.1.1.2.10.1 netbsd-7-0-2-RELEASE:1.1.1.2.10.1 netbsd-7-0-1-RELEASE:1.1.1.2.10.1 netbsd-7-0:1.1.1.2.10.1.0.2 netbsd-7-0-RELEASE:1.1.1.2.10.1 netbsd-7-0-RC3:1.1.1.2.10.1 netbsd-7-0-RC2:1.1.1.2.10.1 netbsd-7-0-RC1:1.1.1.2.10.1 MesaLib-10-3-5:1.1.1.3 netbsd-5-2-3-RELEASE:1.1.1.1 netbsd-5-1-5-RELEASE:1.1.1.1 netbsd-6-0-6-RELEASE:1.1.1.2 netbsd-6-1-5-RELEASE:1.1.1.2 netbsd-7:1.1.1.2.0.10 netbsd-7-base:1.1.1.2 MesaLib-7-11-2:1.1.1.2 netbsd-6-1-4-RELEASE:1.1.1.2 netbsd-6-0-5-RELEASE:1.1.1.2 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.2 riastradh-drm2:1.1.1.2.0.8 riastradh-drm2-base:1.1.1.2 netbsd-6-1-3-RELEASE:1.1.1.2 netbsd-6-0-4-RELEASE:1.1.1.2 netbsd-5-2-2-RELEASE:1.1.1.1 netbsd-5-1-4-RELEASE:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.2 netbsd-6-0-3-RELEASE:1.1.1.2 netbsd-5-2-1-RELEASE:1.1.1.1 netbsd-5-1-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.2 netbsd-6-1:1.1.1.2.0.6 netbsd-6-0-2-RELEASE:1.1.1.2 netbsd-6-1-RELEASE:1.1.1.2 netbsd-6-1-RC4:1.1.1.2 netbsd-6-1-RC3:1.1.1.2 netbsd-6-1-RC2:1.1.1.2 netbsd-6-1-RC1:1.1.1.2 netbsd-5-2:1.1.1.1.0.8 netbsd-6-0-1-RELEASE:1.1.1.2 netbsd-5-2-RELEASE:1.1.1.1 netbsd-5-2-RC1:1.1.1.1 netbsd-6-0:1.1.1.2.0.4 netbsd-6-0-RELEASE:1.1.1.2 netbsd-6-0-RC2:1.1.1.2 netbsd-6-0-RC1:1.1.1.2 netbsd-6:1.1.1.2.0.2 netbsd-6-base:1.1.1.2 netbsd-5-1-2-RELEASE:1.1.1.1 netbsd-5-1-1-RELEASE:1.1.1.1 netbsd-5-1:1.1.1.1.0.6 netbsd-5-1-RELEASE:1.1.1.1 netbsd-5-1-RC4:1.1.1.1 MesaLib-7-8-2:1.1.1.2 netbsd-5-1-RC3:1.1.1.1 MesaLib-7-7-1:1.1.1.2 netbsd-5-1-RC2:1.1.1.1 netbsd-5-1-RC1:1.1.1.1 netbsd-5-0-2-RELEASE:1.1.1.1 MesaLib-7-4-4:1.1.1.1 netbsd-5-0-1-RELEASE:1.1.1.1 MesaLib-7-4-2:1.1.1.1 netbsd-5-0:1.1.1.1.0.4 netbsd-5-0-RELEASE:1.1.1.1 netbsd-5-0-RC4:1.1.1.1 netbsd-5-0-RC3:1.1.1.1 netbsd-5-0-RC2:1.1.1.1 netbsd-5-0-RC1:1.1.1.1 netbsd-5:1.1.1.1.0.2 netbsd-5-base:1.1.1.1 MesaLib-7-0-3:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.2 date 2022.05.09.01.27.12; author mrg; state dead; branches; next 1.1; commitid vdvqJ71xlVGCRjDD; 1.1 date 2008.07.29.05.08.17; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.29.05.08.17; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.05.23.21.22.15; author mrg; state Exp; branches 1.1.1.2.10.1; next 1.1.1.3; 1.1.1.3 date 2014.12.18.06.02.09; author mrg; state Exp; branches; next 1.1.1.4; commitid tzEjkwzaREfP8u2y; 1.1.1.4 date 2019.09.24.16.19.48; author maya; state Exp; branches; next ; commitid KJXusGl8fi9AAhEB; 1.1.1.2.10.1 date 2015.01.05.20.58.25; author martin; state Exp; branches; next ; commitid 1yEFPaBBlEWKuS4y; desc @@ 1.2 log @merge mesa 21.3.7. @ text @
Mesa's off-screen rendering interface is used for rendering into user-allocated blocks of memory. 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 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 progs/osdemo/
directory.
For some applications 8-bit color channels don't have sufficient precision. 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 8 bytes. When using 32-bit channels, channels are GLfloats and RGBA pixels occupy 16 bytes.
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:
make realclean make linux-osmesa16
To build Mesa/OSMesa for 32, 16 and 8-bit color channel support:
make realclean make linux-osmesa32
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 by default.
If performance is important, compile Mesa for the channel size you're most interested in.
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 inclined.