Class NVSampleLocations
This extension allows an application to modify the locations of samples within a pixel used in multisample rasterization. Additionally, it allows applications to specify different sample locations for each pixel in a group of adjacent pixels, which may increase antialiasing quality (particularly if a custom resolve shader is used that takes advantage of these different locations).
It is common for implementations to optimize the storage of depth values by storing values that can be used to reconstruct depth at each sample location, rather than storing separate depth values for each sample. For example, the depth values from a single triangle can be represented using plane equations. When the depth value for a sample is needed, it is automatically evaluated at the sample location. Modifying the sample locations causes the reconstruction to no longer evaluate the same depth values as when the samples were originally generated. This extension provides a command to "resolve" and store per-sample depth values using the currently programmed sample locations, which allows the application to manage this issue if/when necessary.
The programmable sample locations are used during rasterization and for evaluation of depth functions during normal geometric rendering. The programmable locations are associated with a framebuffer object rather than an individual depth buffer, so if the depth buffer is used as a texture the texture sampling may be done at the standard sample locations. Additionally, commands that do not render geometric primitives (e.g. ReadPixels, BlitFramebuffer, CopyTexSubImage2D, etc.) may use the standard sample locations to resolve depth functions rather than the programmable locations. If a single depth buffer is used at different times with different sample locations, the depth functions may be interpreted using the current sample locations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Accepted by thepname
parameter of FramebufferParameteri, GetFramebufferParameteriv.static final int
Accepted by thepname
parameter of FramebufferParameteri, GetFramebufferParameteriv.static final int
Accepted by thepname
parameter of GetMultisamplefv.static final int
Accepted by thepname
parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final int
Accepted by thepname
parameter of GetMultisamplefv.static final int
Accepted by thepname
parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final int
Accepted by thepname
parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final int
Accepted by thepname
parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
glFramebufferSampleLocationsfvNV
(int target, int start, float[] v) Array version of:FramebufferSampleLocationsfvNV
static void
glFramebufferSampleLocationsfvNV
(int target, int start, FloatBuffer v) static void
glNamedFramebufferSampleLocationsfvNV
(int framebuffer, int start, float[] v) Array version of:NamedFramebufferSampleLocationsfvNV
static void
glNamedFramebufferSampleLocationsfvNV
(int framebuffer, int start, FloatBuffer v) static void
static void
nglFramebufferSampleLocationsfvNV
(int target, int start, int count, long v) static void
nglNamedFramebufferSampleLocationsfvNV
(int framebuffer, int start, int count, long v)
-
Field Details
-
GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV
public static final int GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NVAccepted by thepname
parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV
public static final int GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NVAccepted by thepname
parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV
public static final int GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NVAccepted by thepname
parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV
public static final int GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NVAccepted by thepname
parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_SAMPLE_LOCATION_NV
public static final int GL_SAMPLE_LOCATION_NVAccepted by thepname
parameter of GetMultisamplefv.- See Also:
-
GL_PROGRAMMABLE_SAMPLE_LOCATION_NV
public static final int GL_PROGRAMMABLE_SAMPLE_LOCATION_NVAccepted by thepname
parameter of GetMultisamplefv.- See Also:
-
GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV
public static final int GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NVAccepted by thepname
parameter of FramebufferParameteri, GetFramebufferParameteriv.- See Also:
-
GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV
public static final int GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NVAccepted by thepname
parameter of FramebufferParameteri, GetFramebufferParameteriv.- See Also:
-
-
Method Details
-
nglFramebufferSampleLocationsfvNV
public static void nglFramebufferSampleLocationsfvNV(int target, int start, int count, long v) -
glFramebufferSampleLocationsfvNV
-
nglNamedFramebufferSampleLocationsfvNV
public static void nglNamedFramebufferSampleLocationsfvNV(int framebuffer, int start, int count, long v) -
glNamedFramebufferSampleLocationsfvNV
-
glResolveDepthValuesNV
public static void glResolveDepthValuesNV() -
glFramebufferSampleLocationsfvNV
public static void glFramebufferSampleLocationsfvNV(int target, int start, float[] v) Array version of:FramebufferSampleLocationsfvNV
-
glNamedFramebufferSampleLocationsfvNV
public static void glNamedFramebufferSampleLocationsfvNV(int framebuffer, int start, float[] v) Array version of:NamedFramebufferSampleLocationsfvNV
-