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

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

Introduction

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

Prototype

int GL_FALSE

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

Click Source Link

Usage

From source file:com.dragome.gdx.graphics.webgl.DragomeGL20.java

License:Apache License

@Override
public void glGetProgramiv(final int program, final int pname, final IntBuffer params) {
    if (pname == GL20.GL_DELETE_STATUS || pname == GL20.GL_LINK_STATUS || pname == GL20.GL_VALIDATE_STATUS) {
        final boolean result = (Boolean) gl.getProgramParameter(programs.get(program), pname);
        params.put(result ? GL20.GL_TRUE : GL20.GL_FALSE);
    } else {// w  ww  .  j av  a  2 s.  com
        params.put((Integer) gl.getProgramParameter(programs.get(program), pname));
    }
}

From source file:com.dragome.gdx.graphics.webgl.DragomeGL20.java

License:Apache License

@Override
public void glGetShaderiv(final int shader, final int pname, final IntBuffer params) {
    if (pname == GL20.GL_COMPILE_STATUS || pname == GL20.GL_DELETE_STATUS) {
        final boolean result = (Boolean) gl.getShaderParameter(shaders.get(shader), pname);
        params.put(result ? GL20.GL_TRUE : GL20.GL_FALSE);
    } else {/*from   w  w w.  j a v  a  2s .  co m*/
        final int result = (Integer) gl.getShaderParameter(shaders.get(shader), pname);
        params.put(result);
    }
}

From source file:com.watabou.glwrap.Program.java

License:Open Source License

public void link() {
    Gdx.gl.glLinkProgram(handle);// w  w  w  .  j  a  va 2 s  .  com

    IntBuffer status = BufferUtils.newIntBuffer(1);
    Gdx.gl.glGetProgramiv(handle, GL20.GL_LINK_STATUS, status);
    if (status.get() == GL20.GL_FALSE) {
        throw new Error(Gdx.gl.glGetProgramInfoLog(handle));
    }
}

From source file:com.watabou.glwrap.Shader.java

License:Open Source License

public void compile() {
    Gdx.gl.glCompileShader(handle);//from  w w  w. j a  v a2s  .  com

    IntBuffer status = BufferUtils.newIntBuffer(1);
    Gdx.gl.glGetShaderiv(handle, GL20.GL_COMPILE_STATUS, status);
    if (status.get() == GL20.GL_FALSE) {
        throw new Error(Gdx.gl.glGetShaderInfoLog(handle));
    }
}

From source file:org.teavm.gdx.graphics.webgl.TeaVMGL20.java

License:Apache License

@Override
public void glGetProgramiv(final int program, final int pname, final IntBuffer params) {
    if (pname == GL20.GL_DELETE_STATUS || pname == GL20.GL_LINK_STATUS || pname == GL20.GL_VALIDATE_STATUS) {
        final boolean result = gl.getProgramParameterb(programs.get(program), pname);
        params.put(result ? GL20.GL_TRUE : GL20.GL_FALSE);
    } else {//w  w  w.  j  a  v  a 2  s . c  o m
        params.put(gl.getProgramParameteri(programs.get(program), pname));
    }
}

From source file:org.teavm.gdx.graphics.webgl.TeaVMGL20.java

License:Apache License

@Override
public void glGetShaderiv(final int shader, final int pname, final IntBuffer params) {
    if (pname == GL20.GL_COMPILE_STATUS || pname == GL20.GL_DELETE_STATUS) {
        final boolean result = gl.getShaderParameterb(shaders.get(shader), pname);
        params.put(result ? GL20.GL_TRUE : GL20.GL_FALSE);
    } else {/*from  w w  w  . ja  v a2  s .c  om*/
        final int result = gl.getShaderParameteri(shaders.get(shader), pname);
        params.put(result);
    }
}

From source file:org.teavm.libgdx.TeaVMGL20.java

License:Apache License

@Override
public void glGetProgramiv(int program, int pname, IntBuffer params) {
    if (pname == GL20.GL_DELETE_STATUS || pname == GL20.GL_LINK_STATUS || pname == GL20.GL_VALIDATE_STATUS) {
        boolean result = gl.getProgramParameterb(programs.get(program), pname);
        params.put(result ? GL20.GL_TRUE : GL20.GL_FALSE);
    } else {//from   w  ww. java 2 s  .  c o  m
        params.put(gl.getProgramParameteri(programs.get(program), pname));
    }
}

From source file:org.teavm.libgdx.TeaVMGL20.java

License:Apache License

@Override
public void glGetShaderiv(int shader, int pname, IntBuffer params) {
    if (pname == GL20.GL_COMPILE_STATUS || pname == GL20.GL_DELETE_STATUS) {
        boolean result = gl.getShaderParameterb(shaders.get(shader), pname);
        params.put(result ? GL20.GL_TRUE : GL20.GL_FALSE);
    } else {/*w  ww .j a v a  2 s.c o m*/
        int result = gl.getShaderParameteri(shaders.get(shader), pname);
        params.put(result);
    }
}