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

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

Introduction

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

Prototype

int GL_LESS

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

Click Source Link

Usage

From source file:airfoil.Main.java

License:Open Source License

@Override
public void render() {
    if (this.alive) {
        GLCommon gl = Gdx.gl;/*from   ww w  .j ava 2 s  . c om*/
        gl.glViewport(0, 0, this.width, this.height);
        gl.glClearColor(ColorClear.r, ColorClear.g, ColorClear.b, ColorClear.a);
        gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
        gl.glEnable(GL20.GL_DEPTH_TEST);
        gl.glDepthFunc(GL20.GL_LESS);

        /*
         */

        this.renderMeshLines(this.database.getMesh(this.geometry));

    }
}

From source file:com.badlogic.gdx.tests.g3d.shaders.MultiPassShader.java

License:Apache License

@Override
public void render(Renderable renderable) {
    set(u_pass, 0f);// w w w .ja v  a 2  s.  co  m
    super.render(renderable);
    context.setDepthTest(GL20.GL_LESS);
    if (has(u_pass)) {
        context.setBlending(true, GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
        for (int i = 1; i < passes; ++i) {
            set(u_pass, (float) i / (float) passes);
            renderable.mesh.render(program, renderable.primitiveType, renderable.meshPartOffset,
                    renderable.meshPartSize, false);
        }
    }
}