Example usage for com.badlogic.gdx.graphics GL20 GL_DST_ALPHA

List of usage examples for com.badlogic.gdx.graphics GL20 GL_DST_ALPHA

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics GL20 GL_DST_ALPHA.

Prototype

int GL_DST_ALPHA

To view the source code for com.badlogic.gdx.graphics GL20 GL_DST_ALPHA.

Click Source Link

Usage

From source file:at.therefactory.jewelthief.ui.Particles.java

License:Open Source License

/**
 * if particle effect includes additive or pre-multiplied particle emitters
 * you can turn off blend function clean-up to save a lot of draw calls
 * but remember to switch the Batch back to GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA
 * before drawing "regular" sprites or your Stage.
 *
 * @param batch// ww  w  .  j  a v a 2s  .  c o m
 */
private void resetBlendFunction(SpriteBatch batch) {
    batch.setBlendFunction(-1, -1);
    Gdx.gl20.glBlendFuncSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE,
            GL20.GL_DST_ALPHA);
}

From source file:net.bplaced.therefactory.nomoore.utils.Particles.java

License:Open Source License

private void resetBlendFunction(SpriteBatch batch) {
    batch.setBlendFunction(-1, -1);/*from w  ww  . j  av  a2 s. co  m*/
    Gdx.gl20.glBlendFuncSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE,
            GL20.GL_DST_ALPHA);
}