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

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

Introduction

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

Prototype

int GL_DITHER

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

Click Source Link

Usage

From source file:tilo.Tilo.java

License:Open Source License

public void create() {
    int width = 800;
    int height = 600;
    Tilo.width = width;// w ww  .j a  v  a 2  s .c  o m
    Tilo.height = height;

    script = new lua();

    // LOAD PLUGINS
    g.plugin_load();
    script.put("graphics", g);
    script.put("timer", t);
    script.put("window", w);
    script.put("math", m);
    script.put("input", i);
    script.put("audio", a);

    if (getPlatform().equalsIgnoreCase("desktop")) {
        width = 800;
        height = 600;

        Tilo.width = width;
        Tilo.height = height;

        boolean fullscreen = false;
        Gdx.graphics.setDisplayMode(width, height, fullscreen);
    }
    assets = new AssetManager();
    Gdx.input.setInputProcessor(this);

    // LOAD SCRIPT
    FileHandle main = file("main.lua");

    if (main.exists()) {
        script.eval(main.readString());
    } else {
        error(TAG, E_RESOURCE + main.name());
        quit();
    }

    // Enable non power of two textures.
    FileTextureData.copyToPOT = true;

    // Set OpenGL features
    Gdx.gl.glDisable(GL20.GL_CULL_FACE);
    Gdx.gl.glDisable(GL20.GL_DITHER);
    Gdx.gl.glDisable(GL20.GL_DEPTH_TEST);
    Gdx.gl.glEnable(GL20.GL_SCISSOR_TEST);

    script.invoke("tilo", "load", assets);
    ready = true;
}