Section A.1. Multisample


A.1. Multisample

Multisample, included in OpenGL version 1.3, produces full antialiasing by rasterizing primitives with multiple samples per displayed pixel. Each sample consists of full color, depth, and stencil information, so multisample is order independent (as opposed to traditional antialiasing, which uses alpha and blending).

Just as depth test requires you to allocate a depth buffer for your window, multisample requires you to allocate a sample buffer for your window.

To use the multisample feature:

  1. Create a multisample window and rendering context. To do this in GLUT, bitwise-OR the GLUT_MULTISAMPLE bit into the parameter to glutInitDisplayMode().

  2. At init time, enable multisampling with glEnable( GL_MULTISAMPLE ).

Once enabled, all primitives will produce antialiased results.

For more information on multisample, see Chapter 6, "Blending, Antialiasing, Fog, and Polygon Offset," of OpenGL® Programming Guide.




OpenGL Distilled
OpenGL Distilled
ISBN: 0321336798
EAN: 2147483647
Year: 2007
Pages: 123
Authors: Paul Martz

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net