Example usage for com.badlogic.gdx.graphics GL20 GL_LEQUAL

List of usage examples for com.badlogic.gdx.graphics GL20 GL_LEQUAL

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics GL20 GL_LEQUAL.

Prototype

int GL_LEQUAL

To view the source code for com.badlogic.gdx.graphics GL20 GL_LEQUAL.

Click 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();/*  ww w. j a v  a2s  .c o  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);
    }
}

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

License:Apache License

@Override
public void begin(Camera camera, RenderContext context) {
    context.setDepthTest(GL20.GL_NONE);/*  w  ww  . j  av a 2s. c  o m*/

    program.begin();
    viewProjTrans.set(camera.combined);

    context.setDepthTest(GL20.GL_LEQUAL);
    context.setCullFace(GL20.GL_BACK);
    context.setBlending(false, GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);

    texture.bind(0);
    program.setUniformi(u_texture, 0);
}

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();//  w w w.j a v a  2s  .co 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);
}

From source file:com.mbrlabs.mundus.commons.shaders.EntityShader.java

License:Apache License

@Override
public void begin(Camera camera, RenderContext context) {
    this.context = context;
    context.begin();/*  w  w  w  .  j a v a2s  .c  o  m*/

    this.context.setCullFace(GL20.GL_BACK);
    this.context.setDepthTest(GL20.GL_LEQUAL, 0f, 1f);
    this.context.setDepthMask(true);

    program.begin();

    set(UNIFORM_PROJ_VIEW_MATRIX, camera.combined);
    set(UNIFORM_CAM_POS, camera.position);
}

From source file:com.mbrlabs.mundus.commons.shaders.TerrainShader.java

License:Apache License

@Override
public void begin(Camera camera, RenderContext context) {
    this.context = context;
    context.begin();//from  w  ww .  java 2s  .  c  om
    context.setCullFace(GL20.GL_BACK);

    this.context.setDepthTest(GL20.GL_LEQUAL, 0f, 1f);
    this.context.setDepthMask(true);

    program.begin();

    set(UNIFORM_PROJ_VIEW_MATRIX, camera.combined);
    set(UNIFORM_CAM_POS, camera.position);
}

From source file:com.mbrlabs.mundus.editor.tools.picker.PickerShader.java

License:Apache License

@Override
public void begin(Camera camera, RenderContext context) {
    this.context = context;
    this.context.setCullFace(GL20.GL_BACK);
    this.context.setDepthTest(GL20.GL_LEQUAL, 0f, 1f);
    this.context.setDepthMask(true);

    program.begin();/*from   ww w.j a v a2 s .  c  o  m*/

    set(UNIFORM_PROJ_VIEW_MATRIX, camera.combined);
}

From source file:com.mbrlabs.mundus.shader.WireframeShader.java

License:Apache License

@Override
public void begin(Camera camera, RenderContext context) {
    this.context = context;
    this.context.setDepthTest(GL20.GL_LEQUAL, 0f, 1f);
    this.context.setDepthMask(true);

    program.begin();/*from  www. j  a  v  a  2  s  . c om*/

    set(UNIFORM_PROJ_VIEW_MATRIX, camera.combined);
}

From source file:com.mygdx.game.shaders.UberShader.java

License:Apache License

@Override
public void begin(final Camera camera, final RenderContext context) {
    super.begin(camera, context);
    context.setDepthTest(GL20.GL_LEQUAL);
    program.begin();/*www . ja v  a 2  s .  c  o  m*/
}

From source file:ve.ucv.ciens.ccg.nxtar.graphics.shaders.DirectionalLightPerPixelShader.java

License:Apache License

@Override
public void begin(Camera camera, RenderContext context) throws GdxRuntimeException {
    if (this.camera != null || this.context != null)
        throw new GdxRuntimeException("Called begin twice before calling end.");

    this.camera = camera;
    this.context = context;

    // Set render context.
    this.context.setDepthTest(GL20.GL_LEQUAL);
    this.context.setDepthMask(true);
}