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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  5. <title>Performance Tips</title>
  6. <link rel="stylesheet" type="text/css" href="mesa.css">
  7. </head>
  8. <body>
  9. <div class="header">
  10. <h1>The Mesa 3D Graphics Library</h1>
  11. </div>
  12. <iframe src="contents.html"></iframe>
  13. <div class="content">
  14. <h1>Performance Tips</h1>
  15. <p>
  16. Performance tips for software rendering:
  17. </p>
  18. <ol>
  19. <li> Turn off smooth shading when you don't need it (glShadeModel)
  20. <li> Turn off depth buffering when you don't need it.
  21. <li> Turn off dithering when not needed.
  22. <li> Use double buffering as it's often faster than single buffering
  23. <li> Compile in the X Shared Memory extension option if it's supported
  24. on your system by adding -DSHM to CFLAGS and -lXext to XLIBS for
  25. your system in the Make-config file.
  26. <li> Recompile Mesa with more optimization if possible.
  27. <li> Try to maximize the amount of drawing done between glBegin/glEnd pairs.
  28. <li> Use the MESA_BACK_BUFFER variable to find best performance in double
  29. buffered mode. (X users only)
  30. <li> Optimized polygon rasterizers are employed when:
  31. rendering into back buffer which is an XImage
  32. RGB mode, not grayscale, not monochrome
  33. depth buffering is GL_LESS, or disabled
  34. flat or smooth shading
  35. dithered or non-dithered
  36. no other rasterization operations enabled (blending, stencil, etc)
  37. <li> Optimized line drawing is employed when:
  38. rendering into back buffer which is an XImage
  39. RGB mode, not grayscale, not monochrome
  40. depth buffering is GL_LESS or disabled
  41. flat shading
  42. dithered or non-dithered
  43. no other rasterization operations enabled (blending, stencil, etc)
  44. <li> Textured polygons are fastest when:
  45. using a 3-component (RGB), 2-D texture
  46. minification and magnification filters are GL_NEAREST
  47. texture coordinate wrap modes for S and T are GL_REPEAT
  48. GL_DECAL environment mode
  49. glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST )
  50. depth buffering is GL_LESS or disabled
  51. <li> Lighting is fastest when:
  52. Two-sided lighting is disabled
  53. GL_LIGHT_MODEL_LOCAL_VIEWER is false
  54. GL_COLOR_MATERIAL is disabled
  55. No spot lights are used (all GL_SPOT_CUTOFFs are 180.0)
  56. No local lights are used (all position W's are 0.0)
  57. All material and light coefficients are &gt;= zero
  58. <li> XFree86 users: if you want to use 24-bit color try starting your
  59. X server in 32-bit per pixel mode for better performance. That is,
  60. start your X server with
  61. startx -- -bpp 32
  62. instead of
  63. startx -- -bpp 24
  64. <li> Try disabling dithering with the MESA_NO_DITHER environment variable.
  65. If this env var is defined Mesa will disable dithering and the
  66. command glEnable(GL_DITHER) will be ignored.
  67. </ol>
  68. </div>
  69. </body>
  70. </html>