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

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

Introduction

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

Prototype

int GL_LINEAR_MIPMAP_LINEAR

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

Click Source Link

Usage

From source file:com.badlogic.gdx.tests.gles2.MipMap2D.java

License:Apache License

public void render() {
    Gdx.gl20.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
    Gdx.gl20.glClear(GL20.GL_COLOR_BUFFER_BIT);

    Gdx.gl20.glActiveTexture(GL20.GL_TEXTURE0);
    texture.bind();// www.  j a  v  a 2 s .  c o m
    shader.begin();
    shader.setUniformf("s_texture", 0);

    Gdx.gl20.glTexParameteri(GL20.GL_TEXTURE_2D, GL20.GL_TEXTURE_MIN_FILTER, GL20.GL_NEAREST);
    shader.setUniformf("u_offset", -0.6f);
    mesh.render(shader, GL20.GL_TRIANGLES);

    Gdx.gl20.glTexParameteri(GL20.GL_TEXTURE_2D, GL20.GL_TEXTURE_MIN_FILTER, GL20.GL_LINEAR_MIPMAP_LINEAR);
    shader.setUniformf("u_offset", 0.6f);
    mesh.render(shader, GL20.GL_TRIANGLES);

    shader.end();
}