Package com.badlogic.gdx.graphics

Examples of com.badlogic.gdx.graphics.GL20.glGetUniformLocation()


    GL20 gl = Gdx.gl20;
    // -2 == not yet cached
    // -1 == cached but not found
    int location;
    if ((location = uniforms.get(name, -2)) == -2) {
      location = gl.glGetUniformLocation(program, name);
      if (location == -1 && pedantic) throw new IllegalArgumentException("no uniform with name '" + name + "' in shader");
      uniforms.put(name, location);
    }
    return location;
  }
View Full Code Here


  private int fetchUniformLocation (String name) {
    GL20 gl = Gdx.graphics.getGL20();
    int location;
    if ((location = uniforms.get(name, -1)) == -1) {
      location = gl.glGetUniformLocation(program, name);
      if (location == -1 && pedantic) throw new IllegalArgumentException("no uniform with name '" + name + "' in shader");
      uniforms.put(name, location);
    }
    return location;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.