Top Description Fields Constructors Methods
org.lwjgl.opengles

public Class NVCoverageSample

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

Native bindings to the NV_coverage_sample extension.

Anti-aliasing is a critical component for delivering high-quality OpenGL rendering. Traditionally, OpenGL implementations have implemented two anti-aliasing algorithms: edge anti-aliasing and multisampling.

Edge anti-aliasing computes fractional fragment coverage for all primitives in a rendered frame, and blends edges of abutting and/or overlapping primitives to produce smooth results. The image quality produced by this approach is exceptionally high; however, applications are render their geometry perfectly ordered back-to-front in order to avoid artifacts such as bleed-through. Given the algorithmic complexity and performance cost of performing exact geometric sorts, edge anti-aliasing has been used very sparingly, and almost never in interactive games.

Multisampling, on the other hand, computes and stores subpixel (a.k.a. "sample") coverage for rasterized fragments, and replicates all post-alpha test operations (e.g., depth test, stencil test, alpha blend) for each sample. After the entire scene is rendered, the samples are filtered to compute the final anti-aliased image. Because the post-alpha test operations are replicated for each sample, all of the bleed-through and ordering artifacts that could occur with edge anti-aliasing are avoided completely; however, since each sample must be computed and stored separately, anti-aliasing quality is limited by framebuffer storage and rendering performance.

This extension introduces a new anti-aliasing algorithm to OpenGL, which dramatically improves multisampling quality without adversely affecting multisampling's robustness or significantly increasing the storage required, coverage sampling.

Coverage sampling adds an additional high-precision geometric coverage buffer to the framebuffer, which is used to produce high-quality filtered results (with or without the presence of a multisample buffer). This coverage information is computed and stored during rasterization; since applications may render objects where the specified geometry does not correspond to the visual result (examples include alpha-testing for "imposters," or extruded volume rendering for stencil shadow volumes), coverage buffer updates may be masked by the application, analagous to masking the depth buffer.

Field Summary

Modifier and TypeField and Description
public static final int
GL_COVERAGE_ALL_FRAGMENTS_NV

Accepted by the operation parameter of CoverageOperationNV.

public static final int
GL_COVERAGE_ATTACHMENT_NV

Accepted by the attachment parameter of FramebufferRenderbuffer, and GetFramebufferAttachmentParameteriv.

public static final int
GL_COVERAGE_AUTOMATIC_NV

Accepted by the operation parameter of CoverageOperationNV.

public static final int
GL_COVERAGE_BUFFER_BIT_NV

Accepted by the buf parameter of Clear.

public static final int
GL_COVERAGE_BUFFERS_NV

Accepted by the pname parameter of GetIntegerv.

public static final int
GL_COVERAGE_COMPONENT4_NV

Accepted by the internalformat parameter of RenderbufferStorageEXT.

public static final int
GL_COVERAGE_COMPONENT_NV

Accepted by the internalformat parameter of RenderbufferStorageEXT and the format parameter of ReadPixels.

public static final int
GL_COVERAGE_EDGE_FRAGMENTS_NV

Accepted by the operation parameter of CoverageOperationNV.

public static final int
GL_COVERAGE_SAMPLES_NV

Accepted by the pname parameter of GetIntegerv.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static native void
glCoverageMaskNV(boolean mask)

public static native void
glCoverageOperationNV(int operation)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_COVERAGE_ALL_FRAGMENTS_NVback to summary
public static final int GL_COVERAGE_ALL_FRAGMENTS_NV

Accepted by the operation parameter of CoverageOperationNV.

GL_COVERAGE_ATTACHMENT_NVback to summary
public static final int GL_COVERAGE_ATTACHMENT_NV

Accepted by the attachment parameter of FramebufferRenderbuffer, and GetFramebufferAttachmentParameteriv.

GL_COVERAGE_AUTOMATIC_NVback to summary
public static final int GL_COVERAGE_AUTOMATIC_NV

Accepted by the operation parameter of CoverageOperationNV.

GL_COVERAGE_BUFFER_BIT_NVback to summary
public static final int GL_COVERAGE_BUFFER_BIT_NV

Accepted by the buf parameter of Clear.

GL_COVERAGE_BUFFERS_NVback to summary
public static final int GL_COVERAGE_BUFFERS_NV

Accepted by the pname parameter of GetIntegerv.

GL_COVERAGE_COMPONENT4_NVback to summary
public static final int GL_COVERAGE_COMPONENT4_NV

Accepted by the internalformat parameter of RenderbufferStorageEXT.

GL_COVERAGE_COMPONENT_NVback to summary
public static final int GL_COVERAGE_COMPONENT_NV

Accepted by the internalformat parameter of RenderbufferStorageEXT and the format parameter of ReadPixels.

GL_COVERAGE_EDGE_FRAGMENTS_NVback to summary
public static final int GL_COVERAGE_EDGE_FRAGMENTS_NV

Accepted by the operation parameter of CoverageOperationNV.

GL_COVERAGE_SAMPLES_NVback to summary
public static final int GL_COVERAGE_SAMPLES_NV

Accepted by the pname parameter of GetIntegerv.

Constructor Detail

NVCoverageSampleback to summary
protected NVCoverageSample()

Method Detail

glCoverageMaskNVback to summary
public static native void glCoverageMaskNV(boolean mask)
glCoverageOperationNVback to summary
public static native void glCoverageOperationNV(int operation)