Class NVConservativeRaster
- java.lang.Object
-
- org.lwjgl.opengl.NVConservativeRaster
-
public class NVConservativeRaster extends java.lang.ObjectNative bindings to the NV_conservative_raster extension.This extension adds a "conservative" rasterization mode where any pixel that is partially covered, even if no sample location is covered, is treated as fully covered and a corresponding fragment will be shaded.
A new control is also added to modify window coordinate snapping precision.
These controls can be used to implement "binning" to a low-resolution render target, for example to determine which tiles of a sparse texture need to be populated. An app can construct a framebuffer where there is one pixel per tile in the sparse texture, and adjust the number of subpixel bits such that snapping occurs to the same effective grid as when rendering to the sparse texture. Then triangles should cover (at least) the same pixels in the low-res framebuffer as they do tiles in the sparse texture.
-
-
Field Summary
Fields Modifier and Type Field and Description static intGL_CONSERVATIVE_RASTERIZATION_NVAccepted by thecapparameter of Enable, Disable, IsEnabled.static intGL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV
GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV
GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NVAccepted by thepnameparameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidglSubpixelPrecisionBiasNV(int xbits, int ybits)Sets theSUBPIXEL_PRECISION_BIAS_X_BITS_NVandSUBPIXEL_PRECISION_BIAS_Y_BITS_NVvalues.
-
-
-
Field Detail
-
GL_CONSERVATIVE_RASTERIZATION_NV
Accepted by thecapparameter of Enable, Disable, IsEnabled.
-
GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV, GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV, GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV
Accepted by thepnameparameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv.
-
-
Method Detail
-
glSubpixelPrecisionBiasNV
public static void glSubpixelPrecisionBiasNV(int xbits, int ybits)Sets theSUBPIXEL_PRECISION_BIAS_X_BITS_NVandSUBPIXEL_PRECISION_BIAS_Y_BITS_NVvalues.The vertex's window x and y coordinates may be optionally converted to fixed-point values with
Nfractional bits. IfCONSERVATIVE_RASTERIZATION_NVis disabled, thenNis the implementation-dependent value ofSUBPIXEL_BITS. IfCONSERVATIVE_RASTERIZATION_NVis enabled,Nis computed as the sum of the value ofSUBPIXEL_BITSand programmable values ofSUBPIXEL_PRECISION_BIAS_X_BITS_NVandSUBPIXEL_PRECISION_BIAS_Y_BITS_NV.When these values are non-zero, the invariance requirement may not apply because the subpixel precision may not be the same at all window coordinates.
- Parameters:
xbits- theSUBPIXEL_PRECISION_BIAS_X_BITS_NVvalue. The initial value is zero.ybits- theSUBPIXEL_PRECISION_BIAS_Y_BITS_NVvalue. The initial value is zero.
-
-