Example usage for com.badlogic.gdx.graphics.g3d.decals DecalBatch flush

List of usage examples for com.badlogic.gdx.graphics.g3d.decals DecalBatch flush

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.g3d.decals DecalBatch flush.

Prototype

public void flush() 

Source Link

Document

Flush this batch sending all contained decals to GL.

Usage

From source file:com.cyphercove.doublehelix.Particles.java

License:Apache License

public void draw(DecalBatch decalBatch, BillboardDecalBatch billboardDecalBatch) {
    if (Settings.pointParticles) {
        for (int i = 0; i < Settings.numParticles; i++) {
            billboardDecalBatch.add(particles.get(i).point);
        }/*from   w w w.  j  a v  a2s. c  om*/
        billboardDecalBatch.flush();
    } else {
        for (int i = 0; i < Settings.numParticles; i++) {
            decalBatch.add(particles.get(i).decal);
        }
        decalBatch.flush();
    }
}