Class EXTRasterMultisample
- java.lang.Object
-
- org.lwjgl.opengl.EXTRasterMultisample
-
public class EXTRasterMultisample extends java.lang.ObjectNative bindings to the EXT_raster_multisample extension.This extension allows rendering to a non-multisample color buffer while rasterizing with more than one sample. The result of rasterization (coverage) is available in the
gl_SampleMaskIn[]fragment shader input, multisample rasterization is enabled for all primitives, and several per- fragment operations operate at the raster sample rate.When using the functionality provided by this extension, depth, stencil, and depth bounds tests must be disabled, and a multisample draw framebuffer must not be used.
A fragment's "coverage", or "effective raster samples" is considered to have "N bits" (as opposed to "one bit" corresponding to the single color sample) through the fragment shader, in the sample mask output, through the multisample fragment operations and occlusion query, until the coverage is finally "reduced" to a single bit in a new "Coverage Reduction" stage that occurs before blending.
-
-
Field Summary
Fields Modifier and Type Field and Description static intGL_EFFECTIVE_RASTER_SAMPLES_EXT
GL_MAX_RASTER_SAMPLES_EXT
GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT
GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXTAccepted by thepnameparameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv.static intGL_RASTER_MULTISAMPLE_EXTAccepted by thecapparameter of Enable, Disable, IsEnabled.static intGL_RASTER_SAMPLES_EXTAccepted by thepnameparameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidglRasterSamplesEXT(int samples, boolean fixedsamplelocations)Selects the number of samples to be used for rasterization.
-
-
-
Field Detail
-
GL_RASTER_MULTISAMPLE_EXT
Accepted by thecapparameter of Enable, Disable, IsEnabled.
-
GL_RASTER_SAMPLES_EXT, GL_MAX_RASTER_SAMPLES_EXT, GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT, GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT, GL_EFFECTIVE_RASTER_SAMPLES_EXT
Accepted by thepnameparameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv.
-
-
Method Detail
-
glRasterSamplesEXT
public static void glRasterSamplesEXT(int samples, boolean fixedsamplelocations)Selects the number of samples to be used for rasterization.samplesrepresents a request for a desired minimum number of samples. Since different implementations may support different sample counts, the actual sample pattern used is implementation-dependent. However, the resulting value forRASTER_SAMPLES_EXTis guaranteed to be greater than or equal tosamplesand no more than the next larger sample count supported by the implementation. IffixedsamplelocationsisTRUE, identical sample locations will be used for all pixels. The sample locations chosen are a function of only the parameters to RasterSamplesEXT and not of any other state.If
RASTER_MULTISAMPLE_EXTis enabled, then the sample pattern chosen by RasterSamplesEXT will be used instead of sampling at the center of the pixel. The sample locations can be queried withGetMultisamplefvwith apnameofSAMPLE_POSITION, similar to normal multisample sample locations.The value
MULTISAMPLE_RASTERIZATION_ALLOWED_EXTisTRUEifSAMPLE_BUFFERSis one or ifRASTER_MULTISAMPLE_EXTis enabled. The valueEFFECTIVE_RASTER_SAMPLES_EXTis equal toRASTER_SAMPLES_EXTifRASTER_MULTISAMPLE_EXTis enabled, otherwise is equal toSAMPLES.Explicit multisample rasterization can not be used in conjunction with depth, stencil, or depth bounds tests, multisample framebuffers, or if
RASTER_SAMPLES_EXTis zero. IfRASTER_MULTISAMPLE_EXTis enabled, the errorINVALID_OPERATIONwill be generated by Draw commands if- the value of
RASTER_SAMPLES_EXTis zero - the depth, stencil, or depth bounds test is enabled
- a multisample draw framebuffer is bound (
SAMPLE_BUFFERSis one)
Errors
An
INVALID_VALUEerror is generated ifsamplesis greater than the value ofMAX_RASTER_SAMPLES_EXT(the implementation-dependent maximum number of samples).- Parameters:
samples- the number of samples to be used for rasterizationfixedsamplelocations- ifTRUE, identical sample locations will be used for all pixels
- the value of
-
-