/** * <code>setSrcFunction</code> sets the source function for the blending equation for both rgb and alpha values. * * @param function * the source function for the blending equation. * @throws IllegalArgumentException * if function is null */ public void setSourceFunction(final SourceFunction function) { setSourceFunctionRGB(function); setSourceFunctionAlpha(function); }
/** * <code>setSrcFunction</code> sets the source function for the blending equation for both rgb and alpha values. * * @param function * the source function for the blending equation. * @throws IllegalArgumentException * if function is null */ public void setSourceFunction(final SourceFunction function) { setSourceFunctionRGB(function); setSourceFunctionAlpha(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 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; }
/** * @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; }