logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

glSampleCoverage - specify multisample coverage parameters

Associated Gets

glGet() with argument GL_SAMPLE_COVERAGE_VALUEglGet() with argument GL_SAMPLE_COVERAGE_INVERTglIsEnabled() with argument GL_MULTISAMPLEglIsEnabled() with argument GL_SAMPLE_ALPHA_TO_COVERAGEglIsEnabled() with argument GL_SAMPLE_ALPHA_TO_ONEglIsEnabled() with argument GL_SAMPLE_COVERAGE

C Specification

voidglSampleCoverage(GLfloatvalue,GLbooleaninvert);

Description

       Multisampling samples a pixel multiple times at various implementation-dependent subpixel locations to
       generate antialiasing effects. Multisampling transparently antialiases points, lines, polygons, and
       images if it is enabled.

       value is used in constructing a temporary mask used in determining which samples will be used in
       resolving the final fragment color. This mask is bitwise-anded with the coverage mask generated from the
       multisampling computation. If the invert flag is set, the temporary mask is inverted (all bits flipped)
       and then the bitwise-and is computed.

       If an implementation does not have any multisample buffers available, or multisampling is disabled,
       rasterization occurs with only a single sample computing a pixel's final RGB color.

       Provided an implementation supports multisample buffers, and multisampling is enabled, then a pixel's
       final color is generated by combining several samples per pixel. Each sample contains color, depth, and
       stencil information, allowing those operations to be performed on each sample.

Name

       glSampleCoverage - specify multisample coverage parameters

Notes

       The type of the value parameter was changed from GLclampf to GLfloat. This change is transparent to user
       code and is described in detail on the removedTypes() page.

Parameters

value
           Specify a single floating-point sample coverage value. The value is clamped to the range 0 1. The
           initial value is 1.0.

       invert
           Specify a single boolean value representing if the coverage masks should be inverted.  GL_TRUE and
           GL_FALSE are accepted. The initial value is GL_FALSE.

See Also

glEnable(), removedTypes()

Version Support

       ┌──────────────────┬───────────────────────────────────────────────────────────────────────┐
       │                  │                OpenGLVersion                                         │
       ├──────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
       │ Function2.02.13.03.13.23.34.04.14.24.34.44.5 │
       │ /                │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Feature          │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Name             │     │     │     │     │     │     │     │     │     │     │     │     │
       ├──────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
       │ glSampleCoverage │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
       └──────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘

See Also