Example usage for com.badlogic.gdx.graphics.g3d.utils RenderContext setDepthTest

List of usage examples for com.badlogic.gdx.graphics.g3d.utils RenderContext setDepthTest

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.g3d.utils RenderContext setDepthTest.

Prototype

public void setDepthTest(final int depthFunction, final float depthRangeNear, final float depthRangeFar) 

Source Link

Usage

From source file:com.github.fauu.helix.core.GeneralShader.java

License:Open Source License

@Override
public void begin(Camera camera, RenderContext context) {
    this.camera = camera;
    this.context = context;

    program.begin();/*from   w w  w  .ja  v  a 2s  . c  o m*/
    program.setUniformMatrix(u_projTrans, camera.combined);

    context.setBlending(true, GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
    context.setCullFace(GL20.GL_BACK);
    context.setDepthTest(GL20.GL_LEQUAL, 0, 1);
    context.setDepthMask(true);
}