mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed disableBlending.
This commit is contained in:
parent
7c8cd2cca8
commit
d99aa12f14
@ -145,7 +145,7 @@ public class TwoColorPolygonBatch implements PolygonBatch {
|
|||||||
if (!drawing) throw new IllegalStateException("begin must be called before end.");
|
if (!drawing) throw new IllegalStateException("begin must be called before end.");
|
||||||
if (vertexIndex > 0) flush();
|
if (vertexIndex > 0) flush();
|
||||||
Gdx.gl.glDepthMask(true);
|
Gdx.gl.glDepthMask(true);
|
||||||
if (isBlendingEnabled()) Gdx.gl.glDisable(GL20.GL_BLEND);
|
if (!blendingDisabled) Gdx.gl.glDisable(GL20.GL_BLEND);
|
||||||
|
|
||||||
lastTexture = null;
|
lastTexture = null;
|
||||||
drawing = false;
|
drawing = false;
|
||||||
@ -1321,8 +1321,13 @@ public class TwoColorPolygonBatch implements PolygonBatch {
|
|||||||
Mesh mesh = this.mesh;
|
Mesh mesh = this.mesh;
|
||||||
mesh.setVertices(vertices, 0, vertexIndex);
|
mesh.setVertices(vertices, 0, vertexIndex);
|
||||||
mesh.setIndices(triangles, 0, triangleIndex);
|
mesh.setIndices(triangles, 0, triangleIndex);
|
||||||
Gdx.gl.glEnable(GL20.GL_BLEND);
|
if (blendingDisabled)
|
||||||
if (blendSrcFunc != -1) Gdx.gl.glBlendFuncSeparate(blendSrcFunc, blendDstFunc, blendSrcFuncAlpha, blendDstFuncAlpha);
|
Gdx.gl.glDisable(GL20.GL_BLEND);
|
||||||
|
else {
|
||||||
|
Gdx.gl.glEnable(GL20.GL_BLEND);
|
||||||
|
if (blendSrcFunc != -1)
|
||||||
|
Gdx.gl.glBlendFuncSeparate(blendSrcFunc, blendDstFunc, blendSrcFuncAlpha, blendDstFuncAlpha);
|
||||||
|
}
|
||||||
mesh.render(shader, GL20.GL_TRIANGLES, 0, triangleIndex);
|
mesh.render(shader, GL20.GL_TRIANGLES, 0, triangleIndex);
|
||||||
|
|
||||||
vertexIndex = 0;
|
vertexIndex = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user