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

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

Introduction

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

Prototype

public void add(Decal decal) 

Source Link

Document

Add a decal to the batch, marking it for later rendering

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 ww. j  a v a2s.co m*/
        billboardDecalBatch.flush();
    } else {
        for (int i = 0; i < Settings.numParticles; i++) {
            decalBatch.add(particles.get(i).decal);
        }
        decalBatch.flush();
    }
}