Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

osmesa.html 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <HTML>
  2. <TITLE>Off-screen Rendering</TITLE>
  3. <link rel="stylesheet" type="text/css" href="mesa.css"></head>
  4. <BODY>
  5. <H1>Off-screen Rendering</H1>
  6. <p>
  7. Mesa's off-screen rendering interface is used for rendering into
  8. user-allocated blocks of memory.
  9. That is, the GL_FRONT colorbuffer is actually a buffer in main memory,
  10. rather than a window on your display.
  11. There are no window system or operating system dependencies.
  12. One potential application is to use Mesa as an off-line, batch-style renderer.
  13. </p>
  14. <p>
  15. The <B>OSMesa</B> API provides three basic functions for making off-screen
  16. renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and
  17. OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for
  18. more information about the API functions.
  19. </p>
  20. <p>
  21. There are several examples of OSMesa in the <code>progs/osdemo/</code>
  22. directory.
  23. </p>
  24. <H2>Deep color channels</H2>
  25. <p>
  26. For some applications 8-bit color channels don't have sufficient
  27. precision.
  28. OSMesa supports 16-bit and 32-bit color channels through the OSMesa interface.
  29. When using 16-bit channels, channels are GLushorts and RGBA pixels occupy
  30. 8 bytes.
  31. When using 32-bit channels, channels are GLfloats and RGBA pixels occupy
  32. 16 bytes.
  33. </p>
  34. <p>
  35. Before version 6.5.1, Mesa had to be recompiled to support exactly
  36. one of 8, 16 or 32-bit channels.
  37. With Mesa 6.5.1, Mesa can be compiled for either 8, 16 or 32-bit channels
  38. and render into any of the smaller size channels.
  39. For example, if Mesa's compiled for 32-bit channels, you can also render
  40. 16 and 8-bit channel images.
  41. </p>
  42. <p>
  43. To build Mesa/OSMesa for 16 and 8-bit color channel support:
  44. <pre>
  45. make realclean
  46. make linux-osmesa16
  47. </pre>
  48. <p>
  49. To build Mesa/OSMesa for 32, 16 and 8-bit color channel support:
  50. <pre>
  51. make realclean
  52. make linux-osmesa32
  53. </pre>
  54. <p>
  55. You'll wind up with a library named libOSMesa16.so or libOSMesa32.so.
  56. Otherwise, most Mesa configurations build an 8-bit/channel libOSMesa.so library
  57. by default.
  58. </p>
  59. <p>
  60. If performance is important, compile Mesa for the channel size you're
  61. most interested in.
  62. </p>
  63. <p>
  64. If you need to compile on a non-Linux platform, copy Mesa/configs/linux-osmesa16
  65. to a new config file and edit it as needed. Then, add the new config name to
  66. the top-level Makefile. Send a patch to the Mesa developers too, if you're
  67. inclined.
  68. </p>
  69. </BODY>
  70. </HTML>