Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ glsamplemasksgis(3G) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



glSampleMaskSGIS(3G)           OpenGL Reference           glSampleMaskSGIS(3G)



NAME
     glSampleMaskSGIS - define mask to modify multisampled pixel fragments


C SPECIFICATION
     void glSampleMaskSGIS( GLclampf value,
                            GLboolean invert )


PARAMETERS
     value   Specifies coverage of the modification mask.  Clamped to the
             range [0, 1]; zero implies no coverage, and one implies full
             coverage.

     invert  GLFALSE to use the modification mask implied by value; GLTRUE
             to use the bitwise inverse of that mask.


DESCRIPTION
     glSampleMaskSGIS defines a mask to modify the coverage of multisampled
     pixel fragments.  This capability is used for antialiased screen-door
     transparency and smooth transitions between two renderings of an object
     (often for level-of-detail management in simulation systems).

     When multisampling is enabled (see glEnable with argument
     GLMULTISAMPLESGIS) a ``fragment mask'' is computed for each fragment
     generated by a primitive.  This mask reflects the amount of the pixel
     covered by the fragment, and determines the frame buffer samples that may
     be affected by the fragment.

     If conversion of alpha values to masks is enabled (glEnable with argument
     GLSAMPLEALPHATOMASKSGIS), the fragment alpha value is used to
     generate a temporary modification mask which is then ANDed with the
     fragment mask.  One way to interpret this is as a form of dithering: a
     multivalued alpha (coverage or opacity) for the whole fragment is
     converted to simple binary values of coverage at many locations (the
     samples).

     After conversion of alpha values to masks, if replacement of alpha values
     is enabled (glEnable with argument GLSAMPLEALPHATOONESGIS), the
     fragment's alpha is set to the maximum allowable value.

     Finally, if fragment mask modification is enabled (glEnable with argument
     GLSAMPLEMASKSGIS), glSampleMaskSGIS defines an additional modification
     mask.  value is used to generate a modification mask in much the same way
     alpha was used above.  If invert is GLTRUE, then the modification mask
     specified by value will be inverted.  The final modification mask will
     then be ANDed with the fragment mask resulting from the previous steps.
     This can be viewed as an ``override'' control that selectively fades the
     effects of multisampled fragments.





                                                                        Page 1





glSampleMaskSGIS(3G)           OpenGL Reference           glSampleMaskSGIS(3G)



     Note that glSampleMaskSGIS(value, GLTRUE) is not necessarily equivalent
     to glSampleMaskSGIS(1.0-value, GLFALSE); due to round-off and other
     issues, complementing the coverage will not necessarily yield an inverted
     modification mask.


NOTES
     glSampleMaskSGIS is part of the SGISmultisample extension, not part of
     the core GL command set.  If GLSGISmultisample is included in the
     string returned by glGetString, when called with argument GLEXTENSIONS,
     extension SGISmultisample is supported by the connection.


ERRORS
     GLINVALIDOPERATION is generated if glSampleMaskSGIS is executed between
     the execution of glBegin and the corresponding execution of glEnd.

ASSOCIATED GETS
     glGet with argument GLSAMPLEMASKVALUESGI, or
     GLSAMPLEMASKINVERTSGI.
     glIsEnabled with argument GLMULTISAMPLESGI, GLSAMPLEALPHATOMASK,
     GLSAMPLEALPHATOONESGI, GLSAMPLEMASKSGI.


MACHINE DEPENDENCIES
     Multisampling is supported only on RealityEngine, RealityEngine2, and VTX
     and InfiniteReality systems.  Currently it can be used with windows of
     multisample-capable Visual types, but not with pixmaps.


SEE ALSO
     glSamplePatternSGIS























                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026