/** * <code>setDestinationFunction</code> sets the destination function for the blending equation for both Alpha and * RGB values. * * @param function * the destination function for the blending equation. * @throws IllegalArgumentException * if function is null */ public void setDestinationFunction(final DestinationFunction function) { setDestinationFunctionRGB(function); setDestinationFunctionAlpha(function); }
/** * <code>setDestinationFunction</code> sets the destination function for the blending equation for both Alpha and * RGB values. * * @param function * the destination function for the blending equation. * @throws IllegalArgumentException * if function is null */ public void setDestinationFunction(final DestinationFunction function) { setDestinationFunctionRGB(function); setDestinationFunctionAlpha(function); }
/** * @return a blend state that does alpha blending and writes the max alpha value (source or destination) back to the * color buffer. */ private static BlendState createSrcRGBMaxAlphaBlend() { final BlendState state = new BlendState(); state.setBlendEnabled(true); state.setSourceFunctionRGB(SourceFunction.SourceAlpha); state.setDestinationFunctionRGB(DestinationFunction.Zero); state.setBlendEquationRGB(BlendEquation.Add); state.setSourceFunctionAlpha(SourceFunction.SourceAlpha); state.setDestinationFunctionAlpha(DestinationFunction.DestinationAlpha); state.setBlendEquationAlpha(BlendEquation.Max); return state; }
/** * @return a blend state that does alpha blending and writes the max alpha value (source or destination) back to the * color buffer. */ private static BlendState createSrcRGBMaxAlphaBlend() { final BlendState state = new BlendState(); state.setBlendEnabled(true); state.setSourceFunctionRGB(SourceFunction.SourceAlpha); state.setDestinationFunctionRGB(DestinationFunction.Zero); state.setBlendEquationRGB(BlendEquation.Add); state.setSourceFunctionAlpha(SourceFunction.SourceAlpha); state.setDestinationFunctionAlpha(DestinationFunction.DestinationAlpha); state.setBlendEquationAlpha(BlendEquation.Max); return state; }
/** * @return a blend state that does alpha blending and writes the max alpha value (source or destination) back to the * color buffer. */ private static BlendState createBlendRGBMaxAlphaBlend() { final BlendState state = new BlendState(); state.setBlendEnabled(true); state.setSourceFunctionRGB(SourceFunction.SourceAlpha); state.setDestinationFunctionRGB(DestinationFunction.OneMinusSourceAlpha); state.setBlendEquationRGB(BlendEquation.Add); state.setSourceFunctionAlpha(SourceFunction.SourceAlpha); state.setDestinationFunctionAlpha(DestinationFunction.DestinationAlpha); state.setBlendEquationAlpha(BlendEquation.Max); return state; }
/** * @return a blend state that does alpha blending and writes the max alpha value (source or destination) back to the * color buffer. */ private static BlendState createBlendRGBMaxAlphaBlend() { final BlendState state = new BlendState(); state.setBlendEnabled(true); state.setSourceFunctionRGB(SourceFunction.SourceAlpha); state.setDestinationFunctionRGB(DestinationFunction.OneMinusSourceAlpha); state.setBlendEquationRGB(BlendEquation.Add); state.setSourceFunctionAlpha(SourceFunction.SourceAlpha); state.setDestinationFunctionAlpha(DestinationFunction.DestinationAlpha); state.setBlendEquationAlpha(BlendEquation.Max); return state; }