List of usage examples for com.badlogic.gdx.graphics GL10 GL_DST_COLOR
int GL_DST_COLOR
To view the source code for com.badlogic.gdx.graphics GL10 GL_DST_COLOR.
Click Source Link
From source file:org.illarion.engine.backend.gdx.GdxGraphics.java
License:Open Source License
private void activateShapeRenderer() { if (shapeRenderer.getCurrentType() != null) { return;// w w w . j av a 2 s . c o m } if (spriteBatchActive) { spriteBatch.end(); spriteBatchActive = false; } gdxGraphics.getGLCommon().glEnable(GL10.GL_BLEND); switch (lastBlendingMode) { case AlphaBlend: gdxGraphics.getGLCommon().glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); break; case Multiply: gdxGraphics.getGLCommon().glBlendFunc(GL10.GL_DST_COLOR, GL10.GL_ZERO); break; } shapeRenderer.begin(ShapeRenderer.ShapeType.FilledRectangle); }
From source file:org.illarion.engine.backend.gdx.GdxGraphics.java
License:Open Source License
@Override public void setBlendingMode(@Nonnull final BlendingMode mode) { if (lastBlendingMode == mode) { return;//from w w w.j av a 2 s . c o m } switch (mode) { case AlphaBlend: spriteBatch.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); break; case Multiply: spriteBatch.setBlendFunction(GL10.GL_DST_COLOR, GL10.GL_ZERO); break; } spriteBatch.enableBlending(); lastBlendingMode = mode; }