Example usage for com.badlogic.gdx.graphics.g3d.attributes DepthTestAttribute DepthTestAttribute

List of usage examples for com.badlogic.gdx.graphics.g3d.attributes DepthTestAttribute DepthTestAttribute

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.g3d.attributes DepthTestAttribute DepthTestAttribute.

Prototype

public DepthTestAttribute(int depthFunc, float depthRangeNear, float depthRangeFar, boolean depthMask) 

Source Link

Usage

From source file:br.com.raphaelbruno.game.zombieinvaders.vr.model.GameObject.java

License:Apache License

public GameObject(ScreenBase context, Model model, BoundingBox bounds) {
    super(model);
    this.context = context;
    this.customBounds = bounds;

    this.bounds = this.customBounds != null ? this.customBounds : new BoundingBox();
    this.center = new Vector3();
    this.enabled = true;
    updateBox();//from   w  ww . j a v a  2s. co m

    this.animations = new AnimationController(this);
    this.blending = new BlendingAttribute(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);

    for (Material item : materials) {
        item.set(new DepthTestAttribute(GL20.GL_LEQUAL, 0.01f, 25f, true));
        item.set(FloatAttribute.createAlphaTest(0.01f));
        item.set(blending);
    }
}