Top Description Fields Constructors Methods
org.lwjgl.opengles

public Class KHRBlendEquationAdvanced

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

Native bindings to the KHR_blend_equation_advanced extension.

This extension adds a number of "advanced" blending equations that can be used to perform new color blending operations, many of which are more complex than the standard blend modes provided by unextended OpenGL. This extension provides two different extension string entries:

Some implementations may support KHR_blend_equation_advanced without supporting KHR_blend_equation_advanced_coherent.

In unextended OpenGL, the set of blending equations is limited, and can be expressed very simply. The MIN and MAX blend equations simply compute component-wise minimums or maximums of source and destination color components. The FUNC_ADD, FUNC_SUBTRACT, and FUNC_REVERSE_SUBTRACT multiply the source and destination colors by source and destination factors and either add the two products together or subtract one from the other. This limited set of operations supports many common blending operations but precludes the use of more sophisticated transparency and blending operations commonly available in many dedicated imaging APIs.

This extension provides a number of new "advanced" blending equations. Unlike traditional blending operations using the FUNC_ADD equation, these blending equations do not use source and destination factors specified by BlendFunc. Instead, each blend equation specifies a complete equation based on the source and destination colors. These new blend equations are used for both RGB and alpha components; they may not be used to perform separate RGB and alpha blending (via functions like BlendEquationSeparate).

These blending operations are performed using premultiplied source and destination colors, where RGB colors produced by the fragment shader and stored in the framebuffer are considered to be multiplied by alpha (coverage). Many of these advanced blending equations are formulated where the result of blending source and destination colors with partial coverage have three separate contributions: from the portions covered by both the source and the destination, from the portion covered only by the source, and from the portion covered only by the destination. Such equations are defined assuming that the source and destination coverage have no spatial correlation within the pixel.

In addition to the coherency issues on implementations not supporting KHR_blend_equation_advanced_coherent, this extension has several limitations worth noting. First, the new blend equations are not supported while rendering to more than one color buffer at once; an INVALID_OPERATION will be generated if an application attempts to render any primitives in this unsupported configuration. Additionally, blending precision may be limited to 16-bit floating-point, which could result in a loss of precision and dynamic range for framebuffer formats with 32-bit floating-point components, and in a loss of precision for formats with 12- and 16-bit signed or unsigned normalized integer components.

Requires GLES 2.0 and EXT_blend_minmax.

Field Summary

Modifier and TypeField and Description
public static final int
GL_COLORBURN_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_COLORDODGE_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_DARKEN_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_DIFFERENCE_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_EXCLUSION_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_HARDLIGHT_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_HSL_COLOR_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_HSL_HUE_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_HSL_LUMINOSITY_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_HSL_SATURATION_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_LIGHTEN_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_MULTIPLY_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_OVERLAY_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_SCREEN_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

public static final int
GL_SOFTLIGHT_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static native void
glBlendBarrierKHR()

Specifies a boundary between passes when using advanced blend equations.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_COLORBURN_KHRback to summary
public static final int GL_COLORBURN_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_COLORDODGE_KHRback to summary
public static final int GL_COLORDODGE_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_DARKEN_KHRback to summary
public static final int GL_DARKEN_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_DIFFERENCE_KHRback to summary
public static final int GL_DIFFERENCE_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_EXCLUSION_KHRback to summary
public static final int GL_EXCLUSION_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_HARDLIGHT_KHRback to summary
public static final int GL_HARDLIGHT_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_HSL_COLOR_KHRback to summary
public static final int GL_HSL_COLOR_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_HSL_HUE_KHRback to summary
public static final int GL_HSL_HUE_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_HSL_LUMINOSITY_KHRback to summary
public static final int GL_HSL_LUMINOSITY_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_HSL_SATURATION_KHRback to summary
public static final int GL_HSL_SATURATION_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_LIGHTEN_KHRback to summary
public static final int GL_LIGHTEN_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_MULTIPLY_KHRback to summary
public static final int GL_MULTIPLY_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_OVERLAY_KHRback to summary
public static final int GL_OVERLAY_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_SCREEN_KHRback to summary
public static final int GL_SCREEN_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

GL_SOFTLIGHT_KHRback to summary
public static final int GL_SOFTLIGHT_KHR

Accepted by the mode parameter of BlendEquation and BlendEquationi.

Constructor Detail

KHRBlendEquationAdvancedback to summary
protected KHRBlendEquationAdvanced()

Method Detail

glBlendBarrierKHRback to summary
public static native void glBlendBarrierKHR()

Specifies a boundary between passes when using advanced blend equations.

When using advanced blending equations, applications should split their rendering into a collection of blending passes, none of which touch an individual sample in the framebuffer more than once. The results of blending are undefined if the sample being blended has been touched previously in the same pass. Any command that causes the value of a sample to be modified using the framebuffer is considered to touch the sample, including clears, blended or unblended primitives, and BlitFramebuffer copies.