List of usage examples for com.badlogic.gdx.graphics.g2d Batch getBlendDstFunc
public int getBlendDstFunc();
From source file:com.esotericsoftware.spine.utils.SkeletonDrawable.java
License:Open Source License
public void draw(Batch batch, float x, float y, float width, float height) { int blendSrc = batch.getBlendSrcFunc(), blendDst = batch.getBlendDstFunc(); int blendSrcAlpha = batch.getBlendSrcFuncAlpha(), blendDstAlpha = batch.getBlendDstFuncAlpha(); skeleton.setPosition(x, y);/*from w ww . j av a2 s. c o m*/ skeleton.updateWorldTransform(); renderer.draw(batch, skeleton); if (resetBlendFunction) batch.setBlendFunctionSeparate(blendSrc, blendDst, blendSrcAlpha, blendDstAlpha); }
From source file:net.mwplay.cocostudio.ui.particleutil.CCParticleActor.java
License:Apache License
protected void drawParticles(Batch batch) { int srcFunc = batch.getBlendSrcFunc(); int dstFunc = batch.getBlendDstFunc(); batch.setBlendFunction(blendSrc, blendDst); //System.out.println("_particleCount:"+_particleCount); for (int i = 0; i < _particleCount; i++) { batch.draw(m_pTexture, vertices[i], 0, 20); }/*from ww w. j a v a 2 s.com*/ batch.setBlendFunction(srcFunc, dstFunc); // batch.setBlendFunction(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); }