Clone of mesa.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

osmesa.html 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 1.2.4 introduced off-screen rendering, a facility for generating
  8. 3-D imagery without having to open a window on your display. Mesa's
  9. simple off-screen rendering interface is completely operating system
  10. and window system independent so programs which use off-screen
  11. rendering should be very portable. This feature effectively
  12. enables you to use Mesa as an off-line, batch-oriented renderer.
  13. </p>
  14. <p>
  15. The "OSMesa" API provides 3 functions for making off-screen
  16. renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and
  17. OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for
  18. more information. See the demos/osdemo.c file for an example program.
  19. There is no facility for writing images to files. That's up to you.
  20. </p>
  21. <p>
  22. If you want to generate large images (larger than 1280x1024) you'll
  23. have to edit the src/config.h file to change MAX_WIDTH and MAX_HEIGHT
  24. then recompile Mesa. Image size should only be limited by available
  25. memory.
  26. </p>
  27. <H2>Deep color channels</H2>
  28. <p>
  29. For some applications 8-bit color channels don't have sufficient
  30. accuracy (film and IBR, for example). If you're in this situation
  31. you'll be happy to know that Mesa supports 16-bit and 32-bit color
  32. channels through the OSMesa interface. When using 16-bit channels,
  33. channels are GLushorts and RGBA pixels occupy 8 bytes. When using 32-bit
  34. channels, channels are GLfloats and RGBA pixels occupy 16 bytes.
  35. </p>
  36. <p>
  37. To build Mesa/OSMesa with 16-bit color channels:
  38. <pre>
  39. make realclean
  40. make linux-osmesa16
  41. </pre>
  42. For 32-bit channels:
  43. <pre>
  44. make realclean
  45. make linux-osmesa32
  46. </pre>
  47. <p>
  48. You'll wind up with a library named libOSMesa16.so or libOSMesa32.so.
  49. </p>
  50. <p>
  51. If you need to compile on a non-Linux platform, copy Mesa/configs/linux-osmesa16
  52. to a new config file and edit it as needed. Then, add the new config name to
  53. the top-level Makefile. Send a patch to the Mesa developers too, if you're
  54. inclined.
  55. </p>
  56. <p>
  57. BE WARNED: 16 and 32-bit channel support has not been exhaustively
  58. tested and there may be some bugs. However, a number of people have
  59. been using this feature successfully so it can't be too broken.
  60. </p>
  61. </BODY>
  62. </HTML>