Example usage for com.badlogic.gdx.graphics GL11 GL_VIEWPORT

List of usage examples for com.badlogic.gdx.graphics GL11 GL_VIEWPORT

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics GL11 GL_VIEWPORT.

Prototype

int GL_VIEWPORT

To view the source code for com.badlogic.gdx.graphics GL11 GL_VIEWPORT.

Click Source Link

Usage

From source file:org.interreg.docexplore.reader.gfx.Camera.java

License:Open Source License

public double[] unproject(double[] screen, double[] res) {
    GL10 gl = Gdx.gl10;//from  w  w  w .  j  a v  a 2  s  .  co  m
    Gdx.gl11.glGetFloatv(GL11.GL_MODELVIEW_MATRIX, modelView);
    Gdx.gl11.glGetFloatv(GL11.GL_PROJECTION_MATRIX, projection);
    gl.glGetIntegerv(GL11.GL_VIEWPORT, viewport);

    unproject((float) screen[0], (float) screen[1], (float) screen[2], modelView.array(), projection.array(),
            viewport.array(), res);
    //res[0] = pos.get(0); res[1] = pos.get(1); res[2] = pos.get(2);
    return res;
}