Example usage for org.lwjgl.opengl ARBImaging glBlendColor

List of usage examples for org.lwjgl.opengl ARBImaging glBlendColor

Introduction

In this page you can find the example usage for org.lwjgl.opengl ARBImaging glBlendColor.

Prototype

public static void glBlendColor(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green,
        @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha) 

Source Link

Document

Specifies the constant color Cc to be used in blending.

Usage

From source file:com.ardor3d.scene.state.lwjgl.LwjglBlendStateUtil.java

License:Open Source License

protected static void applyBlendColor(final boolean enabled, final BlendState state,
        final BlendStateRecord record, final ContextCapabilities caps) {
    if (enabled) {
        final boolean applyConstant = state.getDestinationFunctionRGB().usesConstantColor()
                || state.getSourceFunctionRGB().usesConstantColor()
                || (caps.isConstantBlendColorSupported()
                        && (state.getDestinationFunctionAlpha().usesConstantColor()
                                || state.getSourceFunctionAlpha().usesConstantColor()));
        if (applyConstant && caps.isConstantBlendColorSupported()) {
            final ReadOnlyColorRGBA constant = state.getConstantColor();
            if (!record.isValid()
                    || (caps.isConstantBlendColorSupported() && !record.blendColor.equals(constant))) {
                ARBImaging.glBlendColor(constant.getRed(), constant.getGreen(), constant.getBlue(),
                        constant.getAlpha());
                record.blendColor.set(constant);
            }//w w w. j a  v  a2 s.com
        }
    }
}