Example usage for org.lwjgl.opengl ARBImaging GL_FUNC_ADD

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

Introduction

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

Prototype

int GL_FUNC_ADD

To view the source code for org.lwjgl.opengl ARBImaging GL_FUNC_ADD.

Click Source Link

Document

Accepted by the mode parameter of BlendEquation.

Usage

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

License:Open Source License

protected static int getGLEquationValue(final BlendEquation eq, final ContextCapabilities caps) {
    switch (eq) {
    case Min:// ww  w. j av  a2 s  .co m
        if (caps.isMinMaxBlendEquationsSupported()) {
            return EXTBlendMinmax.GL_MIN_EXT;
        }
        // FALLS THROUGH
    case Max:
        if (caps.isMinMaxBlendEquationsSupported()) {
            return EXTBlendMinmax.GL_MAX_EXT;
        } else {
            return ARBImaging.GL_FUNC_ADD;
        }
    case Subtract:
        if (caps.isSubtractBlendEquationsSupported()) {
            return EXTBlendSubtract.GL_FUNC_SUBTRACT_EXT;
        }
        // FALLS THROUGH
    case ReverseSubtract:
        if (caps.isSubtractBlendEquationsSupported()) {
            return EXTBlendSubtract.GL_FUNC_REVERSE_SUBTRACT_EXT;
        }
        // FALLS THROUGH
    case Add:
        return ARBImaging.GL_FUNC_ADD;
    }
    throw new IllegalArgumentException("Invalid blend equation: " + eq);
}